Skip to content

Commit 97561bb

Browse files
committed
Add hadolint
1 parent e291533 commit 97561bb

File tree

3 files changed

+17
-9
lines changed

3 files changed

+17
-9
lines changed

.devcontainer/Dockerfile

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,25 @@ FROM mcr.microsoft.com/devcontainers/cpp:ubuntu-24.04
33

44
# Update and upgrade packages
55

6-
RUN apt update && apt upgrade --yes
6+
RUN apt-get update && apt-get upgrade --yes
77

88
# Install additional packages
99

10-
RUN apt install --yes gcc-14 g++-14
11-
RUN apt install --yes clang-format clang-tidy cppcheck iwyu lcov pre-commit
10+
RUN apt-get install --no-install-recommends --yes clang-format clang-tidy cppcheck gcc-14 g++-14 iwyu lcov pre-commit
1211

1312
# Choose default gcc and g++ version
1413

1514
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 13 \
16-
&& update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 14
17-
18-
RUN update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-13 13 \
19-
&& update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-14 14
20-
21-
RUN update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-13 13 \
15+
&& update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 14 \
16+
&& update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-13 13 \
17+
&& update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-14 14 \
18+
&& update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-13 13 \
2219
&& update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-14 14
2320

21+
# Download hadolint
22+
RUN curl -Lo /bin/hadolint https://github.com/hadolint/hadolint/releases/latest/download/hadolint-Linux-x86_64 \
23+
&& chmod +x /bin/hadolint
24+
2425
# Post-start script
2526

2627
COPY post-start.sh /

.hadolint.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
ignored:
2+
- DL3008
3+
- DL3009

.pre-commit-config.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ repos:
55
hooks:
66
- id: check-github-actions
77
- id: check-github-workflows
8+
- repo: https://github.com/petalmd/dockerfile-pre-commit
9+
rev: v1.0
10+
hooks:
11+
- id: dockerlint
812
- repo: https://github.com/cheshirekow/cmake-format-precommit
913
rev: v0.6.10
1014
hooks:

0 commit comments

Comments
 (0)