Skip to content

Commit

Permalink
Add node 18.19.0 to the image.
Browse files Browse the repository at this point in the history
  • Loading branch information
marji committed Jan 23, 2024
1 parent 4e7e2e4 commit e7e5950
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ LABEL maintainer="[email protected]"
LABEL org.opencontainers.image.source="https://github.com/morpht/ci-php"

ENV COMPOSER_VERSION=2.6.6 \
COMPOSER_HASH_SHA256=72600201c73c7c4b218f1c0511b36d8537963e36aafa244757f52309f885b314
COMPOSER_HASH_SHA256=72600201c73c7c4b218f1c0511b36d8537963e36aafa244757f52309f885b314

RUN apk add --no-cache --update git \
bash \
Expand All @@ -22,6 +22,25 @@ RUN apk add --no-cache --update git \
&& echo "$COMPOSER_HASH_SHA256 /usr/local/bin/composer" | sha256sum -c \
&& chmod +x /usr/local/bin/composer

# Remove warning about running as root in composer
ENV COMPOSER_ALLOW_SUPERUSER=1

### Install node

ENV NODE_VERSION=18.19.0 \
CHECKSUM=10b7b23b6b867a25f060a433b83f5c3ecb3bcf7cdba1c0ce46443065a832fd41

RUN ARCH='x64'; \
set -eu; \
apk add --no-cache \
libstdc++ \
&& curl -fsSLO --compressed "https://unofficial-builds.nodejs.org/download/release/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH-musl.tar.xz" \
&& echo "$CHECKSUM node-v$NODE_VERSION-linux-$ARCH-musl.tar.xz" | sha256sum -c - \
&& tar -xJf "node-v$NODE_VERSION-linux-$ARCH-musl.tar.xz" -C /usr/local --strip-components=1 --no-same-owner \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs \
&& node --version \
&& npm --version

RUN adduser -D -h /home/runner -u $RUNNER_UID runner

USER runner

0 comments on commit e7e5950

Please sign in to comment.