Skip to content

Commit d103f92

Browse files
committed
Added node v18.19.0 into the image.
1 parent 9f503aa commit d103f92

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

Dockerfile

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ LABEL maintainer="marji@morpht.com"
66
LABEL org.opencontainers.image.source="https://github.com/morpht/ci-php"
77

88
ENV COMPOSER_VERSION=2.6.6 \
9-
COMPOSER_HASH_SHA256=72600201c73c7c4b218f1c0511b36d8537963e36aafa244757f52309f885b314
9+
COMPOSER_HASH_SHA256=72600201c73c7c4b218f1c0511b36d8537963e36aafa244757f52309f885b314
1010

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

25+
# Remove warning about running as root in composer
26+
ENV COMPOSER_ALLOW_SUPERUSER=1
27+
28+
### Install node
29+
30+
ENV NODE_VERSION=18.19.0 \
31+
CHECKSUM=10b7b23b6b867a25f060a433b83f5c3ecb3bcf7cdba1c0ce46443065a832fd41
32+
33+
RUN ARCH='x64'; \
34+
set -eu; \
35+
apk add --no-cache \
36+
libstdc++ \
37+
&& curl -fsSLO --compressed "https://unofficial-builds.nodejs.org/download/release/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH-musl.tar.xz" \
38+
&& echo "$CHECKSUM node-v$NODE_VERSION-linux-$ARCH-musl.tar.xz" | sha256sum -c - \
39+
&& tar -xJf "node-v$NODE_VERSION-linux-$ARCH-musl.tar.xz" -C /usr/local --strip-components=1 --no-same-owner \
40+
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs \
41+
&& node --version \
42+
&& npm --version
43+
2544
RUN adduser -D -h /home/runner -u $RUNNER_UID runner
2645

2746
USER runner

0 commit comments

Comments
 (0)