Dockerfile in Tubrorepo

Aanan75/12/2023
Hi I have a Turborepo where I have a nextjs frontend “web” and an express backend “api” both connected through trpc (guess that’s obv). I’m kinda finding it difficult to create a docker image for this 🫠 has anybody else done this before? Any example I could take a look at? Thanks!
Nnlucas5/12/2023
If you can find a guide for hosting express in docker then it will also work for this
Nnlucas5/12/2023
If you have any specific issues though, we might be able to help
Aanan75/12/2023
I'm actually failing to dockerise my nextjs app. forgot to mention that.
BBazESO5/12/2023
Can you show us your Dockerfiles ?
Aanan75/12/2023
FROM node:16-alpine RUN apk add --no-cache libc6-compat WORKDIR /app COPY . . ENV NODE_ENV=production ENV NEXT_TELEMETRY_DISABLED 1 RUN npm ci RUN npm run -w api dbgen RUN npm run -w web build EXPOSE 3000 CMD ["npm", "start", "-w", "web"]
Aanan75/12/2023
I've noticed my build fails when I use yarn and I want to use npm but in the build section, it says no lock file found and begins to use yarn. when I run that build command locally it builds perfectly.