T
TanStackβ€’8mo ago
stormy-gold

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"]
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
services:
server:
container_name: my_container
build:
context: ./
dockerfile: dev.Dockerfile
env_file:
- .env
volumes:
- ./:/app
ports:
- 3000:3000
Build a Project from Scratch | TanStack Router React Docs
[!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...
No description
6 Replies
unwilling-turquoise
unwilling-turquoiseβ€’8mo ago
I haven't tested personally but maybe you can have a look at this implementation https://discord.com/channels/719702312431386674/1238170697650405547/1323277618270830673
stormy-gold
stormy-goldOPβ€’8mo ago
awesome thanks I will give it a try
sensitive-blue
sensitive-blueβ€’8mo ago
hey that’s mine
unwilling-turquoise
unwilling-turquoiseβ€’8mo ago
πŸ˜‚ Yeah @thibault all thanks goes to @notKamui πŸ”₯
sensitive-blue
sensitive-blueβ€’8mo ago
okay i actually read the issue, and my repo doesnt solve this after all, my docker things are for production deployment, not dev
stormy-gold
stormy-goldOPβ€’8mo ago
yeah unfortunately this doesn't solve the issue as well for me with node.

Did you find this page helpful?