diff --git a/Dockerfile b/Dockerfile index ffa062bf..615a02da 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,14 +2,16 @@ FROM node:22-alpine as build-stage # make the 'app' folder the current working directory WORKDIR /app -# copy project files and folders to the current working directory (i.e. 'app' folder) -COPY . ./ # config node options ENV NODE_OPTIONS=--max_old_space_size=8192 -# config pnpm, install dependencies and build +# config pnpm, install dependencies +COPY package.json pnpm-lock.yaml* ./ RUN npm install pnpm@9.x -g && \ - pnpm install && \ - pnpm build + pnpm install --frozen-lockfile +# copy project files and folders to the current working directory (i.e. 'app' folder) +COPY . ./ +# build the project +RUN pnpm build RUN echo "build successful 🎉 🎉 🎉"