From 20ee345bbfc739227a7594a4df2daca5c7578782 Mon Sep 17 00:00:00 2001 From: Marc Cataford Date: Sat, 13 Apr 2024 20:22:24 -0400 Subject: [PATCH] feat(ubuntu-ci): preinstall node20 --- build-ci.sh | 6 ++++++ images/Dockerfile.ubuntu-latest | 22 ++++++++++++++++++++-- 2 files changed, 26 insertions(+), 2 deletions(-) create mode 100755 build-ci.sh diff --git a/build-ci.sh b/build-ci.sh new file mode 100755 index 0000000..6afb6f7 --- /dev/null +++ b/build-ci.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +( + cd images + podman build -t ubuntu-ci:dev -f ./Dockerfile.ubuntu-latest +) || exit 1 diff --git a/images/Dockerfile.ubuntu-latest b/images/Dockerfile.ubuntu-latest index a207942..f186fa1 100644 --- a/images/Dockerfile.ubuntu-latest +++ b/images/Dockerfile.ubuntu-latest @@ -1,11 +1,29 @@ FROM ubuntu:22.04 +ENV NODE_VERSION="20.12.2" + RUN apt update && apt upgrade -y --autoremove RUN apt install -y \ jq \ podman \ - nodejs \ - git + git \ + xz-utils \ + curl \ + ca-certificates \ + --no-install-recommends + +# Node needs to be installed to ensure that actions can run in the +# runner. + +WORKDIR tmp + +RUN curl https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64.tar.xz --output /tmp/node-v$NODE_VERSION-linux-x64.tar.xz && \ + tar -xf /tmp/node-v$NODE_VERSION-linux-x64.tar.xz && \ + cp -r /tmp/node-v$NODE_VERSION-linux-x64/bin/* /bin/ && \ + cp -r /tmp/node-v$NODE_VERSION-linux-x64/lib/* /lib/ && \ + rm -rf /tmp/node-* + +WORKDIR / COPY ./files/registries.conf /etc/containers/registries.conf