diff --git a/.github/workflows/tools-rippled.yml b/.github/workflows/tools-rippled.yml index d662ac5..4e73455 100644 --- a/.github/workflows/tools-rippled.yml +++ b/.github/workflows/tools-rippled.yml @@ -23,9 +23,8 @@ env: DOXYGEN_VERSION: 1.9.8+ds-2build5 GCC_VERSION: 14 GRAPHVIZ_VERSION: 2.42.2-9ubuntu0.1 - NODE_VERSION: 24.5.0 + NODE_VERSION: 24.6.0 NPM_VERSION: 11.5.2 - NVM_VERSION: 0.40.3 PRETTIER_VERSION: 3.6.2 PRE_COMMIT_VERSION: 4.2.0 UBUNTU_VERSION: noble @@ -98,7 +97,6 @@ jobs: GRAPHVIZ_VERSION=${{ env.GRAPHVIZ_VERSION }} NODE_VERSION=${{ env.NODE_VERSION }} NPM_VERSION=${{ env.NPM_VERSION }} - NVM_VERSION=${{ env.NVM_VERSION }} PRETTIER_VERSION=${{ env.PRETTIER_VERSION }} PRE_COMMIT_VERSION=${{ env.PRE_COMMIT_VERSION }} context: docker/tools-rippled diff --git a/docker/debian/Dockerfile b/docker/debian/Dockerfile index 41305e0..95518ee 100644 --- a/docker/debian/Dockerfile +++ b/docker/debian/Dockerfile @@ -3,11 +3,11 @@ # contain dynamic values supplied via an argument. We are using GCC image rather # than the official Debian package to access the latest versions, built by the # GCC team specifically for this Debian release. For build images using official -# distribution packages, see Ubuntu. We set the GCC version to "invalid" to +# distribution packages, see Ubuntu. We set the GCC version to "undefined" to # satisfy the syntax checker, as it checks if the `FROM` command has a valid # image, even though it is not used for Clang. ARG DEBIAN_VERSION -ARG GCC_VERSION=invalid +ARG GCC_VERSION=undefined ARG BASE_IMAGE=gcc:${GCC_VERSION}-${DEBIAN_VERSION} FROM ${BASE_IMAGE} AS gcc-src diff --git a/docker/tools-rippled/Dockerfile b/docker/tools-rippled/Dockerfile index 8a8fbba..e3fe189 100644 --- a/docker/tools-rippled/Dockerfile +++ b/docker/tools-rippled/Dockerfile @@ -1,5 +1,11 @@ +# This argument must be defined before the base image, so it can be used in the +# prettier image, which does not derive from the base image, below. We set both +# the Node and Ubuntu versions to "undefined" to satisfy the syntax checker, as +# it checks if the `FROM` command has a valid image, even when it is not used. +ARG NODE_VERSION=undefined +ARG UBUNTU_VERSION=undefined + # ====================== BASE IMAGE ====================== -ARG UBUNTU_VERSION FROM ubuntu:${UBUNTU_VERSION} AS base # Use Bash as the default shell for RUN commands, using the options @@ -71,11 +77,8 @@ FROM base AS documentation # This is not inherited from base image. ARG DEBIAN_FRONTEND=noninteractive -# Install cmake, required to build the `docs` target. +# Install cmake. ARG CMAKE_VERSION -ENV VIRTUAL_ENV=/opt/venv -RUN python3 -m venv ${VIRTUAL_ENV} -ENV PATH=${VIRTUAL_ENV}/bin:${PATH} RUN pip install --no-cache cmake==${CMAKE_VERSION} # Install make, GCC and create the necessary symlinks. @@ -120,24 +123,18 @@ ENV HOME=/root WORKDIR ${HOME} # ====================== PRETTIER IMAGE ====================== -# Note, we do not install a compiler here. +# Note, this image does not inherit from the base image. -FROM base AS prettier +FROM node:${NODE_VERSION}-alpine AS prettier -# This is not inherited from base image. -ARG DEBIAN_FRONTEND=noninteractive +# Install bash and git. +RUN apk add --no-cache bash git -# Install node and npm via nvm, and then install prettier, see also -# https://nodejs.org/en/download. -ARG NODE_VERSION +# Update NPM and install prettier. ARG NPM_VERSION -ARG NVM_VERSION ARG PRETTIER_VERSION ENV NPM_CONFIG_REGISTRY=https://registry.npmjs.org RUN <