Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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" \
Expand All @@ -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 \
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.all
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

Expand All @@ -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 \
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
22 changes: 22 additions & 0 deletions docker-bake.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
group "default" {
targets = [
"all",
"22",
"21",
"21-alpine",
"20",
Expand Down Expand Up @@ -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"]
Expand Down
Loading