Skip to content

Commit

Permalink
Add support for dockerfile lint and fix flagged issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Twon committed Nov 8, 2023
1 parent cdf709f commit 2351920
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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]

0 comments on commit 2351920

Please sign in to comment.