From f830bab4ec14f3fe814962a6a2dee180149c3a6a Mon Sep 17 00:00:00 2001 From: Kevin J Hoerr Date: Mon, 20 Sep 2021 19:43:18 +0000 Subject: The Whole Barnshow Commit - Use yarn-berry instead of npm, with Zero Install feature and goodies - Add `initializeToken` to post unique token to logs on startup - Package upgrades - Fix index.html.template tests I will never do this again --- Dockerfile | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'Dockerfile') diff --git a/Dockerfile b/Dockerfile index 90d232d..e6e78c5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,20 +5,27 @@ WORKDIR /app # Stage 2. Dependencies FROM base AS dependencies COPY package*.json ./ -RUN npm install +COPY yarn.lock ./ +COPY .yarnrc.yml ./ +COPY .yarn ./.yarn +RUN yarn install # Stage 3. TS compilation FROM dependencies AS build COPY src /app/src COPY tsconfig.json /app -RUN npm run tsc +RUN yarn run tsc # Stage 4. Release Image FROM node:lts-alpine AS release WORKDIR /app COPY --from=dependencies /app/package.json ./ -RUN npm install --only=production +COPY --from=dependencies /app/yarn.lock ./ +COPY --from=dependencies /app/.yarnrc.yml ./ +COPY --from=dependencies /app/.yarn/releases ./.yarn/releases +COPY --from=dependencies /app/.yarn/cache ./.yarn/cache +RUN yarn install && yarn cache clean COPY --from=build /app/build ./build COPY public ./public -- cgit