diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index a24c4a56..2b07e831 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -4,14 +4,16 @@ FROM ubuntu:22.04 # Install gcc, clang and some supporting tools for downloading/installing later tools. -RUN apt-get update && apt-get install -y wget g++ lcov llvm git gpg ninja-build software-properties-common unzip +RUN apt-get update && apt-get install -y --no-install-recommends wget g++ lcov llvm git gpg ninja-build software-properties-common unzip && rm -rf /var/lib/apt/lists/* # Install newer CMake from kitware. RUN wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null \ -&& apt-add-repository -y 'deb https://apt.kitware.com/ubuntu/ jammy main' && apt-get update && apt-get install -y cmake +&& apt-add-repository -y 'deb https://apt.kitware.com/ubuntu/ jammy main' && apt-get update && apt-get install -y --no-install-recommends cmake && rm -rf /var/lib/apt/lists/* # Install bazel. RUN wget https://github.com/bazelbuild/bazel/releases/download/6.4.0/bazel-6.4.0-installer-linux-x86_64.sh \ && bash bazel-6.4.0-installer-linux-x86_64.sh && rm bazel-6.4.0-installer-linux-x86_64.sh +RUN rm -rf /var/lib/apt/list/* + ENV PATH="/usr/local/bin:$PATH" diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 83cf1f8e..1e8a2724 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -32,3 +32,8 @@ repos: hooks: - id: clang-format types_or: [c++, c] +- repo: https://github.com/pryorda/dockerfilelint-precommit-hooks + rev: v0.1.0 + hooks: + - id: dockerfilelint + stages: [commit]