File tree Expand file tree Collapse file tree 1 file changed +13
-13
lines changed Expand file tree Collapse file tree 1 file changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -88,6 +88,10 @@ COPY --from=build_wasm /workspace/pkg ./
8888# Final stage - Apache with source code and build capability
8989FROM httpd:2.4 AS final
9090
91+ # Set environment variables for Node.js version
92+ ARG NODE_VERSION
93+ ENV NODE_VERSION=${NODE_VERSION}
94+
9195# Install system dependencies required for Node.js and build tools
9296# hadolint ignore=DL3008
9397RUN apt-get update && \
@@ -101,19 +105,15 @@ RUN apt-get update && \
101105
102106WORKDIR /app
103107
104- # Install Node.js from build argument
105- SHELL ["/bin/bash" , "-o" , "pipefail" , "-c" ]
106- ARG NODE_VERSION
107- ARG TARGETARCH
108- RUN case ${TARGETARCH} in \
109- "amd64" ) \
110- ARCH='x64' \
111- ;; \
112- "arm64" ) \
113- ARCH='arm64' \
114- ;; \
115- esac && \
116- curl -fsSL "https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-${ARCH}.tar.xz" | tar -xJ -C /usr/local --strip-components=1
108+ # Add NodeSource GPG key and repository and install Node.js
109+ RUN bash -c " \
110+ export NODE_MAJOR=$(echo ${NODE_VERSION} | cut -d. -f1); \
111+ mkdir -p /etc/apt/keyrings; \
112+ curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg; \
113+ echo \" deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$${NODE_MAJOR}.x nodistro main\" | tee /etc/apt/sources.list.d/nodesource.list; \
114+ apt-get update; \
115+ apt-get install -y nodejs; \
116+ "
117117
118118# Install Angular CLI
119119COPY ./website/docs/developers/scripts/frontend/install-angular-cli.sh ./scripts/install-angular-cli.sh
You can’t perform that action at this time.
0 commit comments