Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ci/cloudbuild/dockerfiles/demo-alpine-stable.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ RUN apk update && apk add gdb

# Speed up the CI builds using sccache.
WORKDIR /var/tmp/sccache
RUN curl -fsSL https://github.com/mozilla/sccache/releases/download/v0.15.0/sccache-v0.15.0-x86_64-unknown-linux-musl.tar.gz | \
RUN curl -fsSL https://github.com/mozilla/sccache/releases/download/v0.17.0/sccache-v0.17.0-x86_64-unknown-linux-musl.tar.gz | \
tar -zxf - --strip-components=1 && \
mkdir -p /usr/local/bin && \
mv sccache /usr/local/bin/sccache && \
Comment on lines +90 to 93

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

According to the repository's general rules, we should use an ARG to define version strings that are duplicated across multiple Dockerfiles. This improves maintainability and allows overriding the version at build time.

ARG SCCACHE_VERSION=0.17.0
RUN curl -fsSL https://github.com/mozilla/sccache/releases/download/v${SCCACHE_VERSION}/sccache-v${SCCACHE_VERSION}-x86_64-unknown-linux-musl.tar.gz | \
    tar -zxf - --strip-components=1 && \
    mkdir -p /usr/local/bin && \
    mv sccache /usr/local/bin/sccache && \
References
  1. In Dockerfiles, use ARG to define version strings that are duplicated across multiple files to improve maintainability.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ RUN apt-get update && \
apt-get --no-install-recommends install -y gdb

WORKDIR /var/tmp/sccache
RUN curl -fsSL https://github.com/mozilla/sccache/releases/download/v0.15.0/sccache-v0.15.0-x86_64-unknown-linux-musl.tar.gz | \
RUN curl -fsSL https://github.com/mozilla/sccache/releases/download/v0.17.0/sccache-v0.17.0-x86_64-unknown-linux-musl.tar.gz | \
tar -zxf - --strip-components=1 && \
mkdir -p /usr/local/bin && \
mv sccache /usr/local/bin/sccache && \
Comment on lines +193 to 196

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

According to the repository's general rules, we should use an ARG to define version strings that are duplicated across multiple Dockerfiles. This improves maintainability and allows overriding the version at build time.

ARG SCCACHE_VERSION=0.17.0
RUN curl -fsSL https://github.com/mozilla/sccache/releases/download/v${SCCACHE_VERSION}/sccache-v${SCCACHE_VERSION}-x86_64-unknown-linux-musl.tar.gz | \
    tar -zxf - --strip-components=1 && \
    mkdir -p /usr/local/bin && \
    mv sccache /usr/local/bin/sccache && \
References
  1. In Dockerfiles, use ARG to define version strings that are duplicated across multiple files to improve maintainability.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ RUN apt-get update && \
apt-get --no-install-recommends install -y gdb

WORKDIR /var/tmp/sccache
RUN curl -fsSL https://github.com/mozilla/sccache/releases/download/v0.15.0/sccache-v0.15.0-x86_64-unknown-linux-musl.tar.gz | \
RUN curl -fsSL https://github.com/mozilla/sccache/releases/download/v0.17.0/sccache-v0.17.0-x86_64-unknown-linux-musl.tar.gz | \
tar -zxf - --strip-components=1 && \
mkdir -p /usr/local/bin && \
mv sccache /usr/local/bin/sccache && \
Comment on lines +174 to 177

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

According to the repository's general rules, we should use an ARG to define version strings that are duplicated across multiple Dockerfiles. This improves maintainability and allows overriding the version at build time.

ARG SCCACHE_VERSION=0.17.0
RUN curl -fsSL https://github.com/mozilla/sccache/releases/download/v${SCCACHE_VERSION}/sccache-v${SCCACHE_VERSION}-x86_64-unknown-linux-musl.tar.gz | \
    tar -zxf - --strip-components=1 && \
    mkdir -p /usr/local/bin && \
    mv sccache /usr/local/bin/sccache && \
References
  1. In Dockerfiles, use ARG to define version strings that are duplicated across multiple files to improve maintainability.

Expand Down
2 changes: 1 addition & 1 deletion ci/cloudbuild/dockerfiles/demo-fedora.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ RUN curl -fsSL https://github.com/grpc/grpc/archive/v1.71.2.tar.gz | \
RUN dnf makecache && dnf install -y gdb

WORKDIR /var/tmp/sccache
RUN curl -fsSL https://github.com/mozilla/sccache/releases/download/v0.15.0/sccache-v0.15.0-x86_64-unknown-linux-musl.tar.gz | \
RUN curl -fsSL https://github.com/mozilla/sccache/releases/download/v0.17.0/sccache-v0.17.0-x86_64-unknown-linux-musl.tar.gz | \
tar -zxf - --strip-components=1 && \
mkdir -p /usr/local/bin && \
mv sccache /usr/local/bin/sccache && \
Comment on lines +156 to 159

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

According to the repository's general rules, we should use an ARG to define version strings that are duplicated across multiple Dockerfiles. This improves maintainability and allows overriding the version at build time.

ARG SCCACHE_VERSION=0.17.0
RUN curl -fsSL https://github.com/mozilla/sccache/releases/download/v${SCCACHE_VERSION}/sccache-v${SCCACHE_VERSION}-x86_64-unknown-linux-musl.tar.gz | \
    tar -zxf - --strip-components=1 && \
    mkdir -p /usr/local/bin && \
    mv sccache /usr/local/bin/sccache && \
References
  1. In Dockerfiles, use ARG to define version strings that are duplicated across multiple files to improve maintainability.

Expand Down
2 changes: 1 addition & 1 deletion ci/cloudbuild/dockerfiles/demo-opensuse-leap.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ RUN zypper refresh && \
zypper install --allow-downgrade -y gdb

WORKDIR /var/tmp/sccache
RUN curl -fsSL https://github.com/mozilla/sccache/releases/download/v0.15.0/sccache-v0.15.0-x86_64-unknown-linux-musl.tar.gz | \
RUN curl -fsSL https://github.com/mozilla/sccache/releases/download/v0.17.0/sccache-v0.17.0-x86_64-unknown-linux-musl.tar.gz | \
tar -zxf - --strip-components=1 && \
mkdir -p /usr/local/bin && \
mv sccache /usr/local/bin/sccache && \
Comment on lines +170 to 173

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

According to the repository's general rules, we should use an ARG to define version strings that are duplicated across multiple Dockerfiles. This improves maintainability and allows overriding the version at build time.

ARG SCCACHE_VERSION=0.17.0
RUN curl -fsSL https://github.com/mozilla/sccache/releases/download/v${SCCACHE_VERSION}/sccache-v${SCCACHE_VERSION}-x86_64-unknown-linux-musl.tar.gz | \
    tar -zxf - --strip-components=1 && \
    mkdir -p /usr/local/bin && \
    mv sccache /usr/local/bin/sccache && \
References
  1. In Dockerfiles, use ARG to define version strings that are duplicated across multiple files to improve maintainability.

Expand Down
2 changes: 1 addition & 1 deletion ci/cloudbuild/dockerfiles/demo-rockylinux-9.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.24
RUN dnf makecache && dnf update -y && dnf install -y gdb

WORKDIR /var/tmp/sccache
RUN curl -fsSL https://github.com/mozilla/sccache/releases/download/v0.15.0/sccache-v0.15.0-x86_64-unknown-linux-musl.tar.gz | \
RUN curl -fsSL https://github.com/mozilla/sccache/releases/download/v0.17.0/sccache-v0.17.0-x86_64-unknown-linux-musl.tar.gz | \
tar -zxf - --strip-components=1 && \
mkdir -p /usr/local/bin && \
mv sccache /usr/local/bin/sccache && \
Comment on lines +227 to 230

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

According to the repository's general rules, we should use an ARG to define version strings that are duplicated across multiple Dockerfiles. This improves maintainability and allows overriding the version at build time.

ARG SCCACHE_VERSION=0.17.0
RUN curl -fsSL https://github.com/mozilla/sccache/releases/download/v${SCCACHE_VERSION}/sccache-v${SCCACHE_VERSION}-x86_64-unknown-linux-musl.tar.gz | \
    tar -zxf - --strip-components=1 && \
    mkdir -p /usr/local/bin && \
    mv sccache /usr/local/bin/sccache && \
References
  1. In Dockerfiles, use ARG to define version strings that are duplicated across multiple files to improve maintainability.

Expand Down
2 changes: 1 addition & 1 deletion ci/cloudbuild/dockerfiles/demo-ubuntu-24.04.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ RUN apt-get update && \
apt-get --no-install-recommends install -y gdb

WORKDIR /var/tmp/sccache
RUN curl -fsSL https://github.com/mozilla/sccache/releases/download/v0.15.0/sccache-v0.15.0-x86_64-unknown-linux-musl.tar.gz | \
RUN curl -fsSL https://github.com/mozilla/sccache/releases/download/v0.17.0/sccache-v0.17.0-x86_64-unknown-linux-musl.tar.gz | \
tar -zxf - --strip-components=1 && \
mkdir -p /usr/local/bin && \
mv sccache /usr/local/bin/sccache && \
Comment on lines +194 to 197

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

According to the repository's general rules, we should use an ARG to define version strings that are duplicated across multiple Dockerfiles. This improves maintainability and allows overriding the version at build time.

ARG SCCACHE_VERSION=0.17.0
RUN curl -fsSL https://github.com/mozilla/sccache/releases/download/v${SCCACHE_VERSION}/sccache-v${SCCACHE_VERSION}-x86_64-unknown-linux-musl.tar.gz | \
    tar -zxf - --strip-components=1 && \
    mkdir -p /usr/local/bin && \
    mv sccache /usr/local/bin/sccache && \
References
  1. In Dockerfiles, use ARG to define version strings that are duplicated across multiple files to improve maintainability.

Expand Down
2 changes: 1 addition & 1 deletion ci/cloudbuild/dockerfiles/demo-ubuntu-jammy.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ RUN apt-get update && \
apt-get --no-install-recommends install -y gdb

WORKDIR /var/tmp/sccache
RUN curl -fsSL https://github.com/mozilla/sccache/releases/download/v0.15.0/sccache-v0.15.0-x86_64-unknown-linux-musl.tar.gz | \
RUN curl -fsSL https://github.com/mozilla/sccache/releases/download/v0.17.0/sccache-v0.17.0-x86_64-unknown-linux-musl.tar.gz | \
tar -zxf - --strip-components=1 && \
mkdir -p /usr/local/bin && \
mv sccache /usr/local/bin/sccache && \
Comment on lines +165 to 168

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

According to the repository's general rules, we should use an ARG to define version strings that are duplicated across multiple Dockerfiles. This improves maintainability and allows overriding the version at build time.

ARG SCCACHE_VERSION=0.17.0
RUN curl -fsSL https://github.com/mozilla/sccache/releases/download/v${SCCACHE_VERSION}/sccache-v${SCCACHE_VERSION}-x86_64-unknown-linux-musl.tar.gz | \
    tar -zxf - --strip-components=1 && \
    mkdir -p /usr/local/bin && \
    mv sccache /usr/local/bin/sccache && \
References
  1. In Dockerfiles, use ARG to define version strings that are duplicated across multiple files to improve maintainability.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ RUN curl -fsSL https://github.com/matus-chochlik/ctcache/archive/62631eb1c05688f
cd /var/tmp && rm -fr build

WORKDIR /var/tmp/sccache
RUN curl -fsSL https://github.com/mozilla/sccache/releases/download/v0.15.0/sccache-v0.15.0-x86_64-unknown-linux-musl.tar.gz | \
RUN curl -fsSL https://github.com/mozilla/sccache/releases/download/v0.17.0/sccache-v0.17.0-x86_64-unknown-linux-musl.tar.gz | \
tar -zxf - --strip-components=1 && \
mkdir -p /usr/local/bin && \
mv sccache /usr/local/bin/sccache && \
Comment on lines +234 to 237

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

According to the repository's general rules, we should use an ARG to define version strings that are duplicated across multiple Dockerfiles. This improves maintainability and allows overriding the version at build time.

ARG SCCACHE_VERSION=0.17.0
RUN curl -fsSL https://github.com/mozilla/sccache/releases/download/v${SCCACHE_VERSION}/sccache-v${SCCACHE_VERSION}-x86_64-unknown-linux-musl.tar.gz | \
    tar -zxf - --strip-components=1 && \
    mkdir -p /usr/local/bin && \
    mv sccache /usr/local/bin/sccache && \
References
  1. In Dockerfiles, use ARG to define version strings that are duplicated across multiple files to improve maintainability.

Expand Down
2 changes: 1 addition & 1 deletion ci/cloudbuild/dockerfiles/fedora-latest-cmake.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ RUN curl -fsSL https://github.com/matus-chochlik/ctcache/archive/62631eb1c05688f
cd /var/tmp && rm -fr build

WORKDIR /var/tmp/sccache
RUN curl -fsSL https://github.com/mozilla/sccache/releases/download/v0.15.0/sccache-v0.15.0-x86_64-unknown-linux-musl.tar.gz | \
RUN curl -fsSL https://github.com/mozilla/sccache/releases/download/v0.17.0/sccache-v0.17.0-x86_64-unknown-linux-musl.tar.gz | \
tar -zxf - --strip-components=1 && \
mkdir -p /usr/local/bin && \
mv sccache /usr/local/bin/sccache && \
Comment on lines +232 to 235

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

According to the repository's general rules, we should use an ARG to define version strings that are duplicated across multiple Dockerfiles. This improves maintainability and allows overriding the version at build time.

ARG SCCACHE_VERSION=0.17.0
RUN curl -fsSL https://github.com/mozilla/sccache/releases/download/v${SCCACHE_VERSION}/sccache-v${SCCACHE_VERSION}-x86_64-unknown-linux-musl.tar.gz | \
    tar -zxf - --strip-components=1 && \
    mkdir -p /usr/local/bin && \
    mv sccache /usr/local/bin/sccache && \
References
  1. In Dockerfiles, use ARG to define version strings that are duplicated across multiple files to improve maintainability.

Expand Down
2 changes: 1 addition & 1 deletion ci/cloudbuild/dockerfiles/fedora-latest-cxx20.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ RUN curl -fsSL https://github.com/grpc/grpc/archive/v1.83.0.tar.gz | \
cd /var/tmp && rm -fr build

WORKDIR /var/tmp/sccache
RUN curl -fsSL https://github.com/mozilla/sccache/releases/download/v0.10.0/sccache-v0.10.0-x86_64-unknown-linux-musl.tar.gz | \
RUN curl -fsSL https://github.com/mozilla/sccache/releases/download/v0.17.0/sccache-v0.17.0-x86_64-unknown-linux-musl.tar.gz | \
tar -zxf - --strip-components=1 && \
mkdir -p /usr/local/bin && \
mv sccache /usr/local/bin/sccache && \
Comment on lines +199 to 202

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

According to the repository's general rules, we should use an ARG to define version strings that are duplicated across multiple Dockerfiles. This improves maintainability and allows overriding the version at build time.

ARG SCCACHE_VERSION=0.17.0
RUN curl -fsSL https://github.com/mozilla/sccache/releases/download/v${SCCACHE_VERSION}/sccache-v${SCCACHE_VERSION}-x86_64-unknown-linux-musl.tar.gz | \
    tar -zxf - --strip-components=1 && \
    mkdir -p /usr/local/bin && \
    mv sccache /usr/local/bin/sccache && \
References
  1. In Dockerfiles, use ARG to define version strings that are duplicated across multiple files to improve maintainability.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ RUN curl -fsSL https://github.com/grpc/grpc/archive/v1.83.0.tar.gz | \
ldconfig && cd /var/tmp && rm -fr build

WORKDIR /var/tmp/sccache
RUN curl -fsSL https://github.com/mozilla/sccache/releases/download/v0.15.0/sccache-v0.15.0-x86_64-unknown-linux-musl.tar.gz | \
RUN curl -fsSL https://github.com/mozilla/sccache/releases/download/v0.17.0/sccache-v0.17.0-x86_64-unknown-linux-musl.tar.gz | \
tar -zxf - --strip-components=1 && \
mkdir -p /usr/local/bin && \
mv sccache /usr/local/bin/sccache && \
Comment on lines +144 to 147

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

According to the repository's general rules, we should use an ARG to define version strings that are duplicated across multiple Dockerfiles. This improves maintainability and allows overriding the version at build time.

ARG SCCACHE_VERSION=0.17.0
RUN curl -fsSL https://github.com/mozilla/sccache/releases/download/v${SCCACHE_VERSION}/sccache-v${SCCACHE_VERSION}-x86_64-unknown-linux-musl.tar.gz | \
    tar -zxf - --strip-components=1 && \
    mkdir -p /usr/local/bin && \
    mv sccache /usr/local/bin/sccache && \
References
  1. In Dockerfiles, use ARG to define version strings that are duplicated across multiple files to improve maintainability.

Expand Down
2 changes: 1 addition & 1 deletion ci/cloudbuild/dockerfiles/fedora-m32.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.24
ldconfig

WORKDIR /var/tmp/sccache
RUN curl -fsSL https://github.com/mozilla/sccache/releases/download/v0.15.0/sccache-v0.15.0-x86_64-unknown-linux-musl.tar.gz | \
RUN curl -fsSL https://github.com/mozilla/sccache/releases/download/v0.17.0/sccache-v0.17.0-x86_64-unknown-linux-musl.tar.gz | \
tar -zxf - --strip-components=1 && \
mkdir -p /usr/local/bin && \
mv sccache /usr/local/bin/sccache && \
Comment on lines +147 to 150

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

According to the repository's general rules, we should use an ARG to define version strings that are duplicated across multiple Dockerfiles. This improves maintainability and allows overriding the version at build time.

ARG SCCACHE_VERSION=0.17.0
RUN curl -fsSL https://github.com/mozilla/sccache/releases/download/v${SCCACHE_VERSION}/sccache-v${SCCACHE_VERSION}-x86_64-unknown-linux-musl.tar.gz | \
    tar -zxf - --strip-components=1 && \
    mkdir -p /usr/local/bin && \
    mv sccache /usr/local/bin/sccache && \
References
  1. In Dockerfiles, use ARG to define version strings that are duplicated across multiple files to improve maintainability.

Expand Down
2 changes: 1 addition & 1 deletion ci/cloudbuild/dockerfiles/gcc-oldest.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ RUN curl -fsSL https://github.com/nlohmann/json/archive/v3.11.3.tar.gz | \
ldconfig && cd /var/tmp && rm -fr build

WORKDIR /var/tmp/sccache
RUN curl -fsSL https://github.com/mozilla/sccache/releases/download/v0.15.0/sccache-v0.15.0-x86_64-unknown-linux-musl.tar.gz | \
RUN curl -fsSL https://github.com/mozilla/sccache/releases/download/v0.17.0/sccache-v0.17.0-x86_64-unknown-linux-musl.tar.gz | \
tar -zxf - --strip-components=1 && \
mkdir -p /usr/local/bin && \
mv sccache /usr/local/bin/sccache && \
Comment on lines +151 to 154

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

According to the repository's general rules, we should use an ARG to define version strings that are duplicated across multiple Dockerfiles. This improves maintainability and allows overriding the version at build time.

ARG SCCACHE_VERSION=0.17.0
RUN curl -fsSL https://github.com/mozilla/sccache/releases/download/v${SCCACHE_VERSION}/sccache-v${SCCACHE_VERSION}-x86_64-unknown-linux-musl.tar.gz | \
    tar -zxf - --strip-components=1 && \
    mkdir -p /usr/local/bin && \
    mv sccache /usr/local/bin/sccache && \
References
  1. In Dockerfiles, use ARG to define version strings that are duplicated across multiple files to improve maintainability.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ ENV CLOUD_SDK_LOCATION=/usr/local/google-cloud-sdk
ENV PATH=${CLOUD_SDK_LOCATION}/bin:${PATH}

WORKDIR /var/tmp/sccache
RUN curl -fsSL https://github.com/mozilla/sccache/releases/download/v0.15.0/sccache-v0.15.0-x86_64-unknown-linux-musl.tar.gz | \
RUN curl -fsSL https://github.com/mozilla/sccache/releases/download/v0.17.0/sccache-v0.17.0-x86_64-unknown-linux-musl.tar.gz | \
tar -zxf - --strip-components=1 && \
mkdir -p /usr/local/bin && \
mv sccache /usr/local/bin/sccache && \
Comment on lines +214 to 217

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

According to the repository's general rules, we should use an ARG to define version strings that are duplicated across multiple Dockerfiles. This improves maintainability and allows overriding the version at build time.

ARG SCCACHE_VERSION=0.17.0
RUN curl -fsSL https://github.com/mozilla/sccache/releases/download/v${SCCACHE_VERSION}/sccache-v${SCCACHE_VERSION}-x86_64-unknown-linux-musl.tar.gz | \
    tar -zxf - --strip-components=1 && \
    mkdir -p /usr/local/bin && \
    mv sccache /usr/local/bin/sccache && \
References
  1. In Dockerfiles, use ARG to define version strings that are duplicated across multiple files to improve maintainability.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ ENV CLOUD_SDK_LOCATION=/usr/local/google-cloud-sdk
ENV PATH=${CLOUD_SDK_LOCATION}/bin:${PATH}

WORKDIR /var/tmp/sccache
RUN curl -fsSL https://github.com/mozilla/sccache/releases/download/v0.15.0/sccache-v0.15.0-x86_64-unknown-linux-musl.tar.gz | \
RUN curl -fsSL https://github.com/mozilla/sccache/releases/download/v0.17.0/sccache-v0.17.0-x86_64-unknown-linux-musl.tar.gz | \
tar -zxf - --strip-components=1 && \
mkdir -p /usr/local/bin && \
mv sccache /usr/local/bin/sccache && \
Comment on lines +213 to 216

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

According to the repository's general rules, we should use an ARG to define version strings that are duplicated across multiple Dockerfiles. This improves maintainability and allows overriding the version at build time.

ARG SCCACHE_VERSION=0.17.0
RUN curl -fsSL https://github.com/mozilla/sccache/releases/download/v${SCCACHE_VERSION}/sccache-v${SCCACHE_VERSION}-x86_64-unknown-linux-musl.tar.gz | \
    tar -zxf - --strip-components=1 && \
    mkdir -p /usr/local/bin && \
    mv sccache /usr/local/bin/sccache && \
References
  1. In Dockerfiles, use ARG to define version strings that are duplicated across multiple files to improve maintainability.

Expand Down
Loading