From 960b599de4cf20b6a448f2877be0af9cb072b142 Mon Sep 17 00:00:00 2001 From: Mawoka Date: Sat, 9 Apr 2022 12:22:15 +0200 Subject: [PATCH] :arrow_up: Bumped to node17 --- frontend/Dockerfile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/frontend/Dockerfile b/frontend/Dockerfile index 09786bb..0ebef4a 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -1,6 +1,6 @@ ### Build Step # pull the Node.js Docker image -FROM node:16 as builder +FROM node:17.8-bullseye as builder # ENV API_URL=http://api:80 ENV API_URL=https://mawoka.eu ENV REDIS_URL=CHANGE_ME @@ -11,9 +11,10 @@ WORKDIR /usr/src/app # copy the package.json files from local machine to the workdir in container COPY package*.json ./ +COPY pnpm-lock.yaml ./ # run npm install in our local machine -RUN apt update && apt install -y curl && curl -f https://get.pnpm.io/v6.16.js | node - add --global pnpm && pnpm i +RUN corepack enable && corepack prepare pnpm@7.0.0-rc.2 --activate && pnpm i # copy the generated modules and all other files to the container COPY . . @@ -23,14 +24,15 @@ RUN pnpm run build ### Serve Step # pull the Node.js Docker image -FROM node:16 +FROM node:17.8-bullseye-slim # change working directory WORKDIR /app -RUN apt update && apt install -y curl && curl -f https://get.pnpm.io/v6.16.js | node - add --global pnpm && apt purge curl -y && apt autoremove -y +RUN corepack enable && corepack prepare pnpm@7.0.0-rc.2 --activate && pnpm i # copy files from previous step COPY --from=builder /usr/src/app/build . COPY --from=builder /usr/src/app/package.json . +COPY --from=builder /usr/src/app/pnpm-lock.yaml . COPY --from=builder /usr/src/app/node_modules ./node_modules # our app is running on port 3000 within the container, so need to expose it