diff --git a/Dockerfile b/Dockerfile index a7303d1..8b18a14 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,6 +2,7 @@ ARG BASE_IMAGE FROM $BASE_IMAGE ARG CLANG_VERSION +ARG USE_LLVM_REPO=false LABEL \ org.opencontainers.image.vendor="cpp-linter team" \ @@ -14,6 +15,13 @@ LABEL \ RUN set -e \ && apt-get update \ + && if [ "$USE_LLVM_REPO" = "true" ]; then \ + apt-get --no-install-recommends -y install gnupg lsb-release software-properties-common wget \ + && wget --quiet https://apt.llvm.org/llvm.sh \ + && chmod +x llvm.sh \ + && ./llvm.sh $CLANG_VERSION \ + && rm llvm.sh; \ + fi \ && apt-get --no-install-recommends -y install \ clang-format-$CLANG_VERSION \ clang-tidy-$CLANG_VERSION \ diff --git a/Dockerfile.all b/Dockerfile.all index 5cfe108..fcc03e7 100644 --- a/Dockerfile.all +++ b/Dockerfile.all @@ -18,7 +18,7 @@ RUN set -e \ apt-get --no-install-recommends -y install clang-format-$CLANG_VERSION clang-tidy-$CLANG_VERSION; done \ && rm -rf /var/lib/apt/lists/* -ENV CLANG_VERSIONS="21 20 19 18 17 16 15 14 13" +ENV CLANG_VERSIONS="22 21 20 19 18 17 16 15 14 13" SHELL ["/bin/bash", "-o", "pipefail", "-c"] @@ -33,7 +33,7 @@ RUN set -e \ && rm llvm.sh \ && rm -rf /var/lib/apt/lists/* -ENV CLANG_VERSIONS="21 20 19 18 17 16 15 14 13 12 11 10 9" +ENV CLANG_VERSIONS="22 21 20 19 18 17 16 15 14 13 12 11 10 9" # Integrity testing RUN set -e \ && for VERSION in $CLANG_VERSIONS; do \ diff --git a/README.md b/README.md index af58c32..8d36293 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,8 @@ You can access all available Clang Tools Docker images via [Docker Hub registry ## Supported Tags and Dockerfile links -* [`all`](https://github.com/cpp-linter/clang-tools-docker/blob/master/Dockerfile.all) (Supports versions of clang-tools includes `21`, `20`, `19`, `18`, `17`, `16`, `15`, `14`, `13`, `12`, `11`, `10`, `9`) +* [`all`](https://github.com/cpp-linter/clang-tools-docker/blob/master/Dockerfile.all) (Supports versions of clang-tools includes `22`, `21`, `20`, `19`, `18`, `17`, `16`, `15`, `14`, `13`, `12`, `11`, `10`, `9`) +* [`22`](https://github.com/cpp-linter/clang-tools-docker/blob/master/Dockerfile) * [`21`](https://github.com/cpp-linter/clang-tools-docker/blob/master/Dockerfile) * [`21-alpine`](https://github.com/cpp-linter/clang-tools-docker/blob/master/Dockerfile.alpine) * [`20`](https://github.com/cpp-linter/clang-tools-docker/blob/master/Dockerfile) diff --git a/docker-bake.hcl b/docker-bake.hcl index 1bce355..3835edb 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -2,6 +2,7 @@ group "default" { targets = [ "all", + "22", "21", "21-alpine", "20", @@ -50,6 +51,27 @@ target "all" { output = ["type=image"] } +target "clang-tools" { + matrix = { + tgt = ["22"] + } + name = "${tgt}" + dockerfile = "Dockerfile" + context = "." + args = { + # https://apt.llvm.org/noble/dists/ + BASE_IMAGE="ubuntu:noble" + CLANG_VERSION="${tgt}", + USE_LLVM_REPO="true", + } + tags = [ + "${DOCKER_REPO}:${tgt}", + "${GITHUB_REPO}:${tgt}" + ] + platforms = ["linux/amd64", "linux/arm64"] + output = ["type=image"] +} + target "clang-tools" { matrix = { tgt = ["21"]