-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.all
46 lines (37 loc) · 1.67 KB
/
Dockerfile.all
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
ARG BASE_IMAGE
FROM $BASE_IMAGE
LABEL \
org.opencontainers.image.vendor="cpp-linter team" \
org.opencontainers.image.title="Clang Tools Docker image" \
org.opencontainers.image.description="The Clang Tools Docker image includes the clang-format and clang-tidy." \
org.opencontainers.image.version="clang-tools:all" \
org.opencontainers.image.url="https://hub.docker.com/r/xianpengshen/clang-tools" \
org.opencontainers.image.source="https://github.com/cpp-linter/clang-tools-docker" \
org.opencontainers.image.licenses="MIT"
ENV CLANG_VERSIONS="12 11 10 9"
RUN set -e \
&& apt-get update \
&& for CLANG_VERSION in $CLANG_VERSIONS; do \
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="19 18 17 16 15 14 13"
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN set -e \
&& apt-get update \
&& 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 \
&& for CLANG_VERSION in $CLANG_VERSIONS; do \
./llvm.sh $CLANG_VERSION \
&& apt-get --no-install-recommends -y install clang-format-$CLANG_VERSION clang-tidy-$CLANG_VERSION; done \
&& rm llvm.sh \
&& rm -rf /var/lib/apt/lists/*
ENV CLANG_VERSIONS="19 18 17 16 15 14 13 12 11 10 9"
# Integrity testing
RUN set -e \
&& for VERSION in $CLANG_VERSIONS; do \
clang-format-$VERSION --version | grep -E "clang-format version $VERSION"; \
clang-tidy-$VERSION --version | grep "LLVM version $VERSION"; \
done
WORKDIR /src
CMD [""]