From 98eb876d4a17950bca0c30fdbc6502f3c508284c Mon Sep 17 00:00:00 2001 From: Dmitriy Safronov <zimniy@cyberbrain.pw> Date: Wed, 18 Dec 2024 19:23:56 +0400 Subject: [PATCH] refactor: Dockerfile with versions for Dependabot Signed-off-by: Dmitriy Safronov <zimniy@cyberbrain.pw> --- Dockerfile | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index b5de150..078b048 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,14 +1,9 @@ -# VERSIONS -ARG NODE_VERSION=20.13.1 -ARG NGINX_VERSION=1.26.0 - # --------------> The builder image -FROM node:$NODE_VERSION AS builder +FROM node:20.13.1 AS builder ENV NODE_ENV=production WORKDIR /app # Install NPM with version -ARG NPM_VERSION=10.8.0 -RUN npm install -g npm@$NPM_VERSION +RUN npm install -g npm@10.8.0 # Install dependencies COPY package*.json ./ ARG NPM_TOKEN @@ -18,8 +13,8 @@ RUN echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc && \ # Build app COPY . . RUN npm run build - + # --------------> The production image -FROM nginxinc/nginx-unprivileged:$NGINX_VERSION AS production +FROM nginxinc/nginx-unprivileged:1.26.0 AS production # Copy built assets from `builder` image COPY --from=builder /app/build/ /usr/share/nginx/html/ -- GitLab