-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update the installation method for Node and add Node v20
Refs DE-1662 Not removing Node 12 and 14, yet... Change-Id: Ia14fc5368c4ffa9d0476624bbec83d0bbaf10594 Reviewed-on: https://gerrit.instructure.com/c/dockerfiles/+/326789 Reviewed-by: Jacob Burroughs <[email protected]> QA-Review: James Belleau <[email protected]> Tested-by: Service Cloud Jenkins <[email protected]>
- Loading branch information
Showing
8 changed files
with
113 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# GENERATED FILE, DO NOT MODIFY! | ||
# To update this file please edit the relevant template and run the generation | ||
# task `rake generate:node` | ||
|
||
ARG ROOT_PATH=instructure | ||
FROM --platform=${TARGETPLATFORM} ${ROOT_PATH}/core:jammy | ||
LABEL maintainer="Instructure" | ||
|
||
USER root | ||
|
||
ENV YARN_VERSION latest | ||
|
||
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \ | ||
&& echo "" \ | ||
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \ | ||
&& apt-get update \ | ||
&& apt-get install -y --no-install-recommends yarn \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/ | ||
|
||
COPY yarn-private /usr/local/bin | ||
|
||
ENV NODE_VERSION 20 | ||
ENV NPM_VERSION latest | ||
|
||
RUN mkdir -p /usr/src/app && chown docker:docker /usr/src/app | ||
WORKDIR /usr/src/app | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y curl && \ | ||
mkdir -p /etc/apt/keyrings && \ | ||
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ | ||
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list && \ | ||
apt-get update && \ | ||
apt-get install -y --no-install-recommends nodejs && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/ && \ | ||
npm install -g "npm@$NPM_VERSION" && \ | ||
rm -rf /root/.npm/_cacache && \ | ||
npm cache clean --force | ||
|
||
COPY npm-private /usr/local/bin | ||
|
||
|
||
USER docker |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
|
||
npm config set "@${NPM_PRIVATE_SCOPE}:registry"="https:${NPM_PRIVATE_REGISTRY}" | ||
npm config set "${NPM_PRIVATE_REGISTRY}:username"="${NPM_PRIVATE_USERNAME}" | ||
npm config set "${NPM_PRIVATE_REGISTRY}:_password"="${NPM_PRIVATE_PASSWORD}" | ||
npm config set "${NPM_PRIVATE_REGISTRY}:email"="${NPM_PRIVATE_EMAIL}" | ||
|
||
npm "$@" | ||
EXIT_CODE=$? | ||
|
||
npm config delete "@${NPM_PRIVATE_SCOPE}:registry" | ||
npm config delete "${NPM_PRIVATE_REGISTRY}:username" | ||
npm config delete "${NPM_PRIVATE_REGISTRY}:_password" | ||
npm config delete "${NPM_PRIVATE_REGISTRY}:email" | ||
|
||
exit $EXIT_CODE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
|
||
npm config set "@${NPM_PRIVATE_SCOPE}:registry"="https:${NPM_PRIVATE_REGISTRY}" | ||
npm config set "${NPM_PRIVATE_REGISTRY}:username"="${NPM_PRIVATE_USERNAME}" | ||
npm config set "${NPM_PRIVATE_REGISTRY}:_password"="${NPM_PRIVATE_PASSWORD}" | ||
npm config set "${NPM_PRIVATE_REGISTRY}:email"="${NPM_PRIVATE_EMAIL}" | ||
|
||
yarn "$@" | ||
EXIT_CODE=$? | ||
|
||
npm config delete "@${NPM_PRIVATE_SCOPE}:registry" | ||
npm config delete "${NPM_PRIVATE_REGISTRY}:username" | ||
npm config delete "${NPM_PRIVATE_REGISTRY}:_password" | ||
npm config delete "${NPM_PRIVATE_REGISTRY}:email" | ||
|
||
exit $EXIT_CODE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters