Skip to content
Closed
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
4 changes: 3 additions & 1 deletion ci/docker/manylinux-retag.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@

ARG MANYLINUX_VERSION
ARG HOSTTYPE
ARG BUILDKITE_BAZEL_CACHE_URL
FROM rayproject/manylinux2014:${MANYLINUX_VERSION}-jdk-${HOSTTYPE}

ARG BUILDKITE_BAZEL_CACHE_URL
ENV BUILDKITE_BAZEL_CACHE_URL=${BUILDKITE_BAZEL_CACHE_URL}
Comment on lines +13 to +14
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The ENV instruction on line 14 is redundant. In Docker, ARG values are automatically available as environment variables during the execution of RUN commands within the same build stage, so the ENV line is not needed for the subsequent RUN block to work.

Furthermore, using ENV persists the build-time value into the image's runtime environment. This is unnecessary here because:

  1. The RUN block already bakes the cache URL directly into the .bazelrc file.
  2. The CI runner (ci/ray_ci/container.py) explicitly passes the correct environment variable at runtime, which would override this image-level default anyway.

Removing the ENV line keeps the image metadata cleaner and avoids baking in a potentially stale default URL.

ARG BUILDKITE_BAZEL_CACHE_URL


# Still keep bazelrc updates to allow BUILDKITE_BAZEL_CACHE_URL to be used.
RUN <<EOF
#!/bin/bash
Expand Down
Loading