From 17a40d15e3975ee7ad08ba18dbbd632378984e23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20M=C3=BCller-Downing?= Date: Wed, 23 Sep 2020 21:06:50 +1000 Subject: [PATCH] Use frozen lockfile when installing dependencies with yarn --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9f3070f3..b9c3a027 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,13 +8,13 @@ WORKDIR /build COPY package.json yarn.lock /build/ # Install only the production dependencies -RUN yarn install --production +RUN yarn install --frozen-lockfile # Cache these modules for production RUN cp -R node_modules/ prod_node_modules/ # Install development dependencies -RUN yarn install +RUN yarn install --frozen-lockfile COPY . /build RUN yarn build @@ -27,7 +27,7 @@ WORKDIR /app COPY --from=build /build/prod_node_modules ./node_modules # Copy generated Prisma client -COPY --from=build /build/node_modules/\.prisma/ ./node_modules/\.prisma/ +COPY --from=build /build/node_modules/.prisma/ ./node_modules/.prisma/ COPY --from=build /build/yarn.lock /build/package.json ./ COPY --from=build /build/.next ./.next