TanStackT
TanStackβ€’13mo agoβ€’
7 replies
forward-apricot

Docker compose with tanstack start

Hey guys,

I am struggling to get docker working with tanstack start in DEV mode ? I keep getting this error (See attached at the bottom). I have tried to play around with the host name but with no luck. I would love some help on this πŸ™Œ

Reproduction steps:
- follow the build from scratch guide from the docs here
- copy the dev.Dockerfile and docker-compose below.
- run
docker compose up


Here is what my dev.Dockerfile looks like:
FROM node:22-alpine

WORKDIR /app

COPY package.json pnpm-lock.yaml* ./

RUN corepack enable pnpm && pnpm i

COPY . .

CMD ["pnpm", "dev"]


And my docker-compose file:
services:
  server:
    container_name: my_container
    build:
      context: ./
      dockerfile: dev.Dockerfile
    env_file:
      - .env
    volumes:
      - ./:/app
    ports:
      - 3000:3000
402350507-d1783ff8-f718-4939-aac3-630920452515.png
[!NOTE] If you chose to quick start with an example or cloned project, you can skip this guide and move on to the guide. So you want to build a TanStack Start project from scratch? This guide will hel...
Build a Project from Scratch | TanStack Router React Docs
Was this page helpful?