From c2011fdf050fd47eadd37ddc358b0cb5883f11ce Mon Sep 17 00:00:00 2001 From: Alex van Andel Date: Thu, 12 Aug 2021 20:54:41 +0000 Subject: [PATCH] Updated Dockerfile to include next.config.js + fixed lockfile install --- Dockerfile | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 90cc27b..f8a4e79 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,20 +1,22 @@ FROM node:14-alpine as deps + +RUN apk add --no-cache libc6-compat WORKDIR /app -COPY calendso/package.json . +COPY calendso/package.json calendso/yarn.lock . COPY calendso/prisma prisma -RUN yarn install --frozen +RUN yarn install ---frozen-lockfile FROM node:14-alpine as builder WORKDIR /app COPY calendso . COPY --from=deps /app/node_modules ./node_modules -RUN yarn build -RUN yarn install --production --ignore-scripts --prefer-offline +RUN yarn build && yarn install --production --ignore-scripts --prefer-offline FROM node:14-alpine as runner WORKDIR /app ENV NODE_ENV production +COPY --from=builder /app/next.config.js ./ COPY --from=builder /app/public ./public COPY --from=builder /app/.next ./.next COPY --from=builder /app/node_modules ./node_modules @@ -22,4 +24,4 @@ COPY --from=builder /app/package.json ./package.json COPY --from=builder /app/prisma ./prisma COPY scripts scripts EXPOSE 3000 -CMD ["/app/scripts/start.sh"] \ No newline at end of file +CMD ["/app/scripts/start.sh"]