From 01ff77c601296d5fdc5e94e22e13d02db25f10d6 Mon Sep 17 00:00:00 2001 From: "Mahadik, Mukul Chandrakant" Date: Thu, 19 Oct 2023 13:12:45 -0700 Subject: [PATCH] Docker base Node image upgraded. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Semver version upgrade required updating npm to latest version containing update semver package. - Previous commit includes unversioned npm package upgraded. - But node base image upgrade is recommended over generalized unversioned upgrade so as to have more control over installed package versions. Found latest tested and analyzed base image here - using node:20.7.0-alpine as the base image. - While newer versions exist, they were uploaded recently (about a day ago) and didn’t have vulnerability analysis available yet. - Hence going ahead with next latest available version (uploaded about 3 weeks ago). --- frontend/Dockerfile | 3 +-- frontend/Dockerfile.dev | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/frontend/Dockerfile b/frontend/Dockerfile index 1249fef..72cc544 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -1,4 +1,4 @@ -FROM node:19-alpine +FROM node:20.7.0-alpine RUN mkdir -p /public WORKDIR /public @@ -6,7 +6,6 @@ WORKDIR /public RUN npm i -g http-server RUN apk update && apk upgrade busybox -RUN npm update -g COPY client /public/client COPY *.html /public/ diff --git a/frontend/Dockerfile.dev b/frontend/Dockerfile.dev index 16823a6..3e978a1 100644 --- a/frontend/Dockerfile.dev +++ b/frontend/Dockerfile.dev @@ -1,4 +1,4 @@ -FROM node:19-alpine +FROM node:20.7.0-alpine RUN mkdir -p /public WORKDIR /public @@ -6,7 +6,6 @@ WORKDIR /public RUN npm i -g http-server RUN apk update && apk upgrade busybox -RUN npm update -g EXPOSE 5050 CMD ["http-server", "-p", "5050"]