Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated node version #3

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions .github/workflows/docker-build-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@ on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest

env:
IMAGE_VERSION: bookworm_rust_1.82-node_18.19.1
IMAGE_VERSION: bookworm_rust_1.82-node_23.10.0

steps:
- name: Checkout code
Expand All @@ -20,15 +23,21 @@ jobs:
uses: docker/setup-buildx-action@v1

- name: Login to GitHub Container Registry
if: github.event_name == 'push'
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin

- name: Build and push multi-platform Docker image
run: |
# Build and tag the Docker image with the version
docker buildx create --use
docker buildx build --push \
--tag ghcr.io/$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]'):${{ env.IMAGE_VERSION }} \
--platform linux/amd64,linux/arm64 .
if [ "${{ github.event_name }}" = "push" ]; then
docker buildx build --push \
--tag ghcr.io/$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]'):${{ env.IMAGE_VERSION }} \
--platform linux/amd64,linux/arm64 .
else
docker buildx build \
--platform linux/amd64,linux/arm64 .
fi

env:
DOCKER_CLI_ACI_AS_TEXT: "true"
16 changes: 6 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ RUN ((cat /etc/os-release | grep ID | grep alpine) && apk add --no-cache musl-de
&& rm -rf $CARGO_HOME/registry/

# ----------------------
# node 18.19.1 via https://github.com/nodejs/docker-node/blob/619b871fb3d89dc6d6333914b46bf526e781eec5/18/bookworm/Dockerfile
# node 23.10.0 via https://github.com/nodejs/docker-node/blob/main/23/bookworm/Dockerfile
# ----------------------
RUN groupadd --gid 1000 node \
&& useradd --uid 1000 --gid node --shell /bin/bash --create-home node

ENV NODE_VERSION 18.19.1
ENV NODE_VERSION 23.10.0

RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
&& case "${dpkgArch##*-}" in \
Expand All @@ -67,18 +67,14 @@ RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
# gpg keys listed at https://github.com/nodejs/node#release-keys
&& set -ex \
&& for key in \
4ED778F539E3634C779C87C6D7062848A1AB005C \
141F07595B7B3FFE74309A937405533BE57C7D57 \
74F12602B6F1C4E913FAA37AD3A89613643B6201 \
C0D6248439F1D5604AAFFB4021D900FFDB233756 \
DD792F5973C6DE52C432CBDAC77ABFA00DDBF2B7 \
61FC681DFB92A079F1685E77973F295594EC4689 \
CC68F5A3106FF448322E48ED27F5E38D5B0A215F \
8FCCA13FEF1D0C2E91008E09770F7A9A5AE15600 \
C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8 \
890C08DB8579162FEE0DF9DB8BEAB4DFCF555EF4 \
C82FA3AE1CBEDC6BE46B9360C43CEC45C17AB93C \
108F52B48DB57BB0CC439B2997B01419BD92F80A \
A363A499291CBBC940DD62E41F10027AF002F8B0 \
CC68F5A3106FF448322E48ED27F5E38D5B0A215F \
; do \
gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$key" || \
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key" ; \
Expand All @@ -96,7 +92,7 @@ RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
&& node --version \
&& npm --version

ENV YARN_VERSION 1.22.19
ENV YARN_VERSION 1.22.22

RUN set -ex \
# use pre-existing gpg directory, see https://github.com/nodejs/docker-node/pull/1895#issuecomment-1550389150
Expand All @@ -119,4 +115,4 @@ RUN set -ex \
&& rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \
# smoke test
&& yarn --version \
&& rm -rf /tmp/*
&& rm -rf /tmp/*
Loading