Skip to content

Commit

Permalink
Merge pull request #891 from snyk/feat/HYB-771/update-base-nlatest-im…
Browse files Browse the repository at this point in the history
…age-to-ubuntu-24.04

feat: upgrade nlatest base image to ubuntu:24.04
  • Loading branch information
pavel-snyk authored Dec 10, 2024
2 parents de37bd5 + 0c438db commit 34002d0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1024,8 +1024,9 @@ workflows:
- team-broker-snyk
requires:
- Scan repository for secrets
additional_arguments: "--build-arg BASE_IMAGE=ubuntu:24.04 --build-arg USER_UID=2000"
dockerfile: dockerfiles/base/Dockerfile
nodejs_cycle: "21"
nodejs_cycle: "23"
project_name: broker-nlatest
post-steps:
- notify-slack-on-failure
Expand Down
10 changes: 6 additions & 4 deletions dockerfiles/base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,19 @@ ARG BASE_IMAGE=ubuntu:20.04
ARG NODE_VERSION=20.11.0


FROM ${BASE_IMAGE} as node-base
FROM ${BASE_IMAGE} AS node-base

ARG NODE_VERSION
ENV DEBIAN_FRONTEND=noninteractive
ENV NODE_VERSION=${NODE_VERSION}
ENV PATH=$PATH:/home/node/.npm-global/bin
ARG USER_UID=1000
ARG USER_GID=${USER_UID}

RUN <<EOF
set -ex
groupadd --gid 1000 node
useradd --uid 1000 --gid node --shell /bin/bash --create-home node
groupadd --gid ${USER_GID} node
useradd --uid ${USER_UID} --gid node --shell /bin/bash --create-home node
apt update
apt upgrade --assume-yes
# install packages needed for node installation
Expand Down Expand Up @@ -76,7 +78,7 @@ EOF



FROM node-base as broker-builder
FROM node-base AS broker-builder

ARG NODE_VERSION
ENV NPM_CONFIG_PREFIX=/home/node/.npm-global
Expand Down

0 comments on commit 34002d0

Please sign in to comment.