#Dockerfile deployment
1 messages · Page 1 of 1 (latest)
change RUN yarn install to RUN yarn install --no-optional --ignore-scripts
ok thank you I try that.
I have most of issues fixed only those ```#14 47.49 ➤ YN0000: └ Completed in 46s 490ms
#14 47.56 ➤ YN0000: ┌ Link step
#14 62.00 ➤ YN0007: │ @prisma/engines@npm:4.8.0 must be built because it never has been before or the last one failed
#14 62.01 ➤ YN0007: │ puppeteer@npm:19.4.1 must be built because it never has been before or the last one failed
#14 62.01 ➤ YN0007: │ javascript-obfuscator@npm:4.0.0 must be built because it never has been before or the last one failed
#14 62.01 ➤ YN0007: │ esbuild@npm:0.15.18 must be built because it never has been before or the last one failed
#14 62.01 ➤ YN0007: │ esbuild@npm:0.16.3 must be built because it never has been before or the last one failed
#14 62.01 ➤ YN0007: │ esbuild@npm:0.16.11 must be built because it never has been before or the last one failed
#14 62.01 ➤ YN0007: │ @prisma/engines@npm:3.15.1-1.461d6a05159055555eb7dfb337c9fb271cbd4d7e must be built because it never has been before or the last one failed
#14 62.01 ➤ YN0007: │ deasync@npm:0.1.28 must be built because it never has been before or the last one failed
#14 62.01 ➤ YN0007: │ core-js-pure@npm:3.27.0 must be built because it never has been before or the last one failed
#14 62.45 ➤ YN0009: │ puppeteer@npm:19.4.1 couldn't be built successfully (exit code 1, logs can be found here: /tmp/xfs-a7e33475/build.log)
#14 62.95 ➤ YN0009: │ deasync@npm:0.1.28 couldn't be built successfully (exit code 1, logs can be found here: /tmp/xfs-95f8b66c/build.log)
#14 66.81 ➤ YN0007: │ prisma@npm:4.8.0 must be built because it never has been before or the last one failed
#14 66.81 ➤ YN0007: │ @prisma/client@npm:4.8.0 [7cc7f] must be built because it never has been before or the last one failed
#14 68.98 ➤ YN0000: └ Completed in 21s 415ms
#14 69.12 ➤ YN0000: Failed with errors in 1m 9s
seemed that nodejs package uses yarn 1.22 by default so you have to change that if you want to use private repro code.
I guess I would need to generate the prisma client also somehow but cannot find good docs on how to do this.
ok this results in the same errors.
your build is failing on prisma install. so maybe check this
Anyone maybe has a working dockerfile? Still not working, tried several images moved to pnpm for access to a private repro it always fails somewhere with obscure error. Killing this
FROM node:18-slim AS deps
RUN apt-get update
RUN apt-get install -y openssl curl
WORKDIR /app
RUN curl -f https://get.pnpm.io/v6.16.js | node - add --global pnpm
COPY .npmrc package.json pnpm-lock.yaml ./
COPY prisma ./prisma/
COPY .env.production ./
COPY tsconfig.json ./
RUN pnpm install --frozen-lockfile --prod
COPY . ./
RUN pnpm install
# SOURCE
# Rebuild the source code only when needed
FROM node:18-slim AS builder
WORKDIR /app
ENV PORT "3000"
ENV HOST "0.0.0.0"
COPY . .
COPY --from=deps /app/node_modules ./node_modules
RUN pnpm run build
RUN pnpm install
# PRODUCTION
# Production image, copy all the files and run Remix
FROM node:18-slim AS runner
WORKDIR /app
ENV NODE_ENV production
COPY --from=builder /app/public ./public
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/package.json ./package.json
COPY --from=builder /app/server ./server
USER remix
EXPOSE 3000```
This got me closest user remix does not exist commenting that yields a pnpm cannot be found