33# contain dynamic values supplied via an argument. We are using GCC image rather
44# than the official Debian package to access the latest versions, built by the
55# GCC team specifically for this Debian release. For build images using official
6- # distribution packages, see Ubuntu.
7- ARG DEBIAN_VERSION=bookworm
8- ARG GCC_VERSION=12
6+ # distribution packages, see Ubuntu. We set the GCC version to "invalid" to
7+ # satisfy the syntax checker, as it checks if the `FROM` command has a valid
8+ # image, even though it is not used for Clang.
9+ ARG DEBIAN_VERSION
10+ ARG GCC_VERSION=invalid
911FROM gcc:${GCC_VERSION}-${DEBIAN_VERSION} AS gcc-src
1012
1113# ====================== BASE IMAGE ======================
@@ -16,7 +18,7 @@ SHELL ["/bin/bash", "-c"]
1618ENTRYPOINT ["/bin/bash" ]
1719
1820# Associate the image with the repository.
19- ARG GITHUB_REPO=XRPLF/ci
21+ ARG GITHUB_REPO
2022LABEL org.opencontainers.image.source=https://github.com/${GITHUB_REPO}
2123
2224# Ensure any packages installed directly or indirectly via dpkg do not require
@@ -46,14 +48,14 @@ apt install -y "${pkgs[@]}"
4648EOF
4749
4850# Install Conan.
49- ARG CONAN_VERSION=2.17.0
51+ ARG CONAN_VERSION
5052RUN PIPX_HOME=/opt/pipx \
5153 PIPX_BIN_DIR=/usr/bin \
5254 PIPX_MAN_DIR=/usr/share/man \
5355 pipx install conan==${CONAN_VERSION}
5456
5557# Create the user to switch to, once all packages have been installed.
56- ARG NONROOT_USER=ci
58+ ARG NONROOT_USER
5759RUN useradd -ms /bin/bash ${NONROOT_USER}
5860
5961# ====================== GCC IMAGE ======================
@@ -105,7 +107,7 @@ FROM base AS clang
105107# must repeat the DEBIAN_VERSION argument here, as it is not inherited from the
106108# base image.
107109ARG DEBIAN_VERSION
108- ARG CLANG_VERSION=16
110+ ARG CLANG_VERSION
109111RUN curl --no-progress-meter https://apt.llvm.org/llvm-snapshot.gpg.key | gpg --dearmor -o /etc/apt/keyrings/llvm.gpg && \
110112 printf "%s\n %s\n " \
111113 "deb [signed-by=/etc/apt/keyrings/llvm.gpg] https://apt.llvm.org/${DEBIAN_VERSION}/ llvm-toolchain-${DEBIAN_VERSION}-${CLANG_VERSION} main" \
0 commit comments