mirror of
https://github.com/outbackdingo/homelab-v.git
synced 2026-08-25 14:53:19 +00:00
feat(devcontainer): add Node
Many GitHub actions rely on Node. If we want to run the actions inside this image we need it Signed-off-by: Vegard Hagen <[email protected]>
This commit is contained in:
@@ -6,6 +6,9 @@ ARG USER_ID=1001
|
|||||||
ARG USER_GID=1001
|
ARG USER_GID=1001
|
||||||
ARG USERNAME=dev
|
ARG USERNAME=dev
|
||||||
|
|
||||||
|
ARG NODE_VERSION=22
|
||||||
|
ARG JAVA_VERSION=21
|
||||||
|
|
||||||
# Remove ubuntu user
|
# Remove ubuntu user
|
||||||
RUN userdel -r ubuntu
|
RUN userdel -r ubuntu
|
||||||
|
|
||||||
@@ -77,6 +80,16 @@ RUN mkdir -p -m 755 /etc/apt/keyrings && \
|
|||||||
echo "deb [arch=${TARGETARCH} signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" \
|
echo "deb [arch=${TARGETARCH} signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" \
|
||||||
| tee /etc/apt/sources.list.d/github-cli.list > /dev/null
|
| tee /etc/apt/sources.list.d/github-cli.list > /dev/null
|
||||||
|
|
||||||
|
# Add Node repo for running GitHub actions
|
||||||
|
RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key \
|
||||||
|
| gpg --dearmor \
|
||||||
|
| tee /usr/share/keyrings/nodesource.gpg > /dev/null && \
|
||||||
|
echo "deb [arch=${TARGETARCH} signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_${NODE_VERSION}.x nodistro main" \
|
||||||
|
| tee /etc/apt/sources.list.d/nodesource.list > /dev/null && \
|
||||||
|
echo "Package: nodejs" | tee /etc/apt/preferences.d/nodejs > /dev/null && \
|
||||||
|
echo "Pin: origin deb.nodesource.com" | tee -a /etc/apt/preferences.d/nodejs > /dev/null && \
|
||||||
|
echo "Pin-Priority: 600" | tee -a /etc/apt/preferences.d/nodejs > /dev/null
|
||||||
|
|
||||||
# Add Adoption repo for JRE needed by IDEA devcontainer
|
# Add Adoption repo for JRE needed by IDEA devcontainer
|
||||||
RUN curl -sSL https://packages.adoptium.net/artifactory/api/gpg/key/public \
|
RUN curl -sSL https://packages.adoptium.net/artifactory/api/gpg/key/public \
|
||||||
| gpg --dearmor \
|
| gpg --dearmor \
|
||||||
@@ -107,7 +120,8 @@ RUN curl -fsSL https://get.opentofu.org/opentofu.gpg \
|
|||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
apt-get install -y --no-install-recommends \
|
apt-get install -y --no-install-recommends \
|
||||||
gh \
|
gh \
|
||||||
temurin-21-jre \
|
nodejs \
|
||||||
|
temurin-${JAVA_VERSION}-jre \
|
||||||
postgresql-client \
|
postgresql-client \
|
||||||
tofu && \
|
tofu && \
|
||||||
apt-get clean && \
|
apt-get clean && \
|
||||||
|
|||||||
Reference in New Issue
Block a user