Skip to content

Commit

Permalink
try skip caching on certain run commands
Browse files Browse the repository at this point in the history
  • Loading branch information
BarisTanyeri committed Jul 28, 2023
1 parent e6f262d commit e0cd062
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"]
COPY .devcontainer/base/apt-requirements.json /tmp/apt-requirements-base.json
COPY .devcontainer/base/apt-repositories.json /tmp/apt-repositories.json
COPY .devcontainer/gcc-${GCC_VERSION}/apt-requirements.json /tmp/apt-requirements-gcc.json

# Skip caching for the next RUN command
ADD "https://www.random.org/cgi-bin/randbyte?nbytes=10&format=h" skipcache

Check notice

Code scanning / Trivy (MegaLinter REPOSITORY_TRIVY)

ADD instead of COPY Low

Artifact: .devcontainer/Dockerfile
Type: dockerfile
Vulnerability DS005
Severity: LOW
Message: Consider using 'COPY "https://www.random.org/cgi-bin/randbyte?nbytes=10&format=h" skipcache' command instead of 'ADD "https://www.random.org/cgi-bin/randbyte?nbytes=10&format=h" skipcache'
Link: DS005
# hadolint ignore=DL3008
RUN apt-get update && apt-get install -y --no-install-recommends jq \
&& jq -s '.[0] * .[1]' /tmp/apt-requirements-base.json /tmp/apt-requirements-gcc.json > /tmp/apt-requirements.json \
Expand All @@ -37,6 +40,8 @@ RUN python3 -m pip --no-cache-dir install \
# Set default generator for CMake to Ninja
ENV CMAKE_GENERATOR="Ninja"

# Skip caching for the next RUN command
ADD "https://www.random.org/cgi-bin/randbyte?nbytes=10&format=h" skipcache

Check notice

Code scanning / Trivy (MegaLinter REPOSITORY_TRIVY)

ADD instead of COPY Low

Artifact: .devcontainer/Dockerfile
Type: dockerfile
Vulnerability DS005
Severity: LOW
Message: Consider using 'COPY "https://www.random.org/cgi-bin/randbyte?nbytes=10&format=h" skipcache' command instead of 'ADD "https://www.random.org/cgi-bin/randbyte?nbytes=10&format=h" skipcache'
Link: DS005
# Install clang toolchain
COPY .devcontainer/clang-${CLANG_VERSION}/apt-requirements.json /tmp/apt-requirements-clang.json
RUN wget -qO - https://apt.llvm.org/llvm-snapshot.gpg.key | gpg --dearmor -o /usr/share/keyrings/llvm-snapshot-keyring.gpg \
Expand Down

0 comments on commit e0cd062

Please sign in to comment.