From ed08b734ba525d8ed0db7c06c38cb6b0ec1ab6c8 Mon Sep 17 00:00:00 2001 From: emma Date: Wed, 10 Apr 2024 14:19:44 -0400 Subject: [PATCH] Fix failing Webpack build - Includes eslint-related files in Dockerfile build step - Switches to using a cache mount in Dockerfile build step for yarn cache, rather than deleting yarn cache, which should speed up most builds --- frontend/Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/Dockerfile b/frontend/Dockerfile index fd3f435e..b58bf74a 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -3,10 +3,8 @@ FROM --platform=$BUILDPLATFORM docker.io/library/node:18 as build_deps WORKDIR /app COPY yarn.lock package.json ./ -# Uses `yarn cache clean` to let Docker cache layer instead -# of including yarn cache in the build image -RUN yarn --production --frozen-lockfile --ignore-optional --network-timeout 1000000 && \ - yarn cache clean +# Uses a cache mount for the Yarn cache so that it's not included in subsequent steps +RUN --mount=type=cache,target=/root/.yarn YARN_CACHE_FOLDER=/root/.yarn yarn --production --frozen-lockfile --ignore-optional --network-timeout 1000000 COPY --link lit-localize.json \ postcss.config.js \ @@ -14,6 +12,8 @@ COPY --link lit-localize.json \ tsconfig.json \ webpack.config.js \ webpack.prod.js \ + .eslintrc.js \ + tsconfig.eslint.json \ index.d.ts \ ./