Skip to content
Merged
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
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
*.so
*.dylib
*.jar
bin
/bin/*
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This change also formalizes committing large Helm binaries into the repo history. If that is intentional, it may be worth calling out explicitly in the PR description because it changes the repository size and maintenance trade-off, not just the Docker build implementation.

!/bin/helm/
!/bin/helm/**

# Test binary, build with `go test -c`
*.test
Expand Down
22 changes: 22 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,28 @@ docker-push-all: pre-setup ${DOCKER_PUSH}
.PHONY: docker-buildx-all-push
docker-buildx-all-push: pre-setup ${DOCKER_BUILDX_PUSH}

##@ Helm Binary

HELM_BINARY_DIR := $(shell pwd)/bin/helm/$(HELM_VERSION)

# Download helm binaries for linux/amd64 and linux/arm64 to bin/helm/<version>/
# Run this target when upgrading HELM_VERSION or on a fresh checkout.
.PHONY: download-helm
download-helm:
mkdir -p $(HELM_BINARY_DIR)
Comment on lines +437 to +445
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

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

The Dockerfiles now expect a pre-existing Helm binary at bin/helm/$(HELM_VERSION)/helm-linux-, but this Makefile doesn't hook download-helm into any docker-build-* / docker-buildx-* targets (and the Dockerfile builder stages don't run it either). As-is, docker builds will fail unless callers manually populate that path; consider wiring download-helm into the docker build flow (either run it in the Dockerfile builder stage or add it as a prerequisite for the Makefile docker targets and ensure CI uses those targets).

Copilot uses AI. Check for mistakes.
@for arch in amd64 arm64; do \
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 architectures are hardcoded to amd64 and arm64. This prevents building for other architectures that might be supported by the project (e.g., ppc64le, s390x). Consider using a variable like SUPPORTED_ARCHS ?= amd64 arm64 to make this more flexible.

	@for arch in $(SUPPORTED_ARCHS); do \

target=$(HELM_BINARY_DIR)/helm-linux-$${arch}; \
if [ ! -f "$${target}" ]; then \
echo "Downloading helm $(HELM_VERSION) linux/$${arch} ..."; \
curl -fsSL https://github.com/fluid-cloudnative/helm/releases/download/$(HELM_VERSION)/helm-$(HELM_VERSION)-linux-$${arch}.tar.gz \
| tar -xz --strip-components=1 -C $(HELM_BINARY_DIR) linux-$${arch}/helm; \
Comment on lines +450 to +451
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

When piping curl to tar, if curl fails (e.g., due to a 404 or network issue), tar might still attempt to process the output or fail with a confusing error. It's safer to download the file first or use a shell that supports set -o pipefail to ensure the command fails if any part of the pipe fails.

Comment on lines +446 to +451
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

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

download-helm uses a curl | tar pipeline, but without pipefail the target can succeed even if the download fails (the pipeline exit status is typically the tar exit code). Consider downloading to a temp file first (or run the recipe under bash with set -o pipefail) so network/HTTP failures reliably fail the Make target.

Suggested change
@for arch in amd64 arm64; do \
target=$(HELM_BINARY_DIR)/helm-linux-$${arch}; \
if [ ! -f "$${target}" ]; then \
echo "Downloading helm $(HELM_VERSION) linux/$${arch} ..."; \
curl -fsSL https://github.com/fluid-cloudnative/helm/releases/download/$(HELM_VERSION)/helm-$(HELM_VERSION)-linux-$${arch}.tar.gz \
| tar -xz --strip-components=1 -C $(HELM_BINARY_DIR) linux-$${arch}/helm; \
@set -e; \
for arch in amd64 arm64; do \
target=$(HELM_BINARY_DIR)/helm-linux-$${arch}; \
if [ ! -f "$${target}" ]; then \
echo "Downloading helm $(HELM_VERSION) linux/$${arch} ..."; \
tmp_tar="$(HELM_BINARY_DIR)/helm-$(HELM_VERSION)-linux-$${arch}.tar.gz"; \
curl -fsSL https://github.com/fluid-cloudnative/helm/releases/download/$(HELM_VERSION)/helm-$(HELM_VERSION)-linux-$${arch}.tar.gz -o "$${tmp_tar}"; \
tar -xz --strip-components=1 -C $(HELM_BINARY_DIR) -f "$${tmp_tar}" linux-$${arch}/helm; \
rm -f "$${tmp_tar}"; \

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

download-helm would be more robust if it failed hard on download or extract errors instead of relying on a curl | tar pipeline. Downloading to a temporary file first would make failure handling and debugging much clearer.

mv $(HELM_BINARY_DIR)/helm $${target}; \
chmod +x $${target}; \
else \
echo "helm $(HELM_VERSION) linux/$${arch} already exists, skipping."; \
fi; \
done
Comment on lines +446 to +457
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

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

download-helm's for loop doesn't fail fast: if one architecture download/extract fails, the loop can continue and still exit 0 if a later iteration succeeds. Consider forcing the recipe to exit on the first failure (e.g., enable set -e within the loop and/or explicitly track/return a non-zero status when any arch fails).

Copilot uses AI. Check for mistakes.

##@ Dependencies

## Location to install dependencies to
Expand Down
Binary file added bin/helm/v3.19.5/helm-linux-amd64
Binary file not shown.
Binary file added bin/helm/v3.19.5/helm-linux-arm64
Binary file not shown.
7 changes: 2 additions & 5 deletions docker/Dockerfile.alluxioruntime
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,8 @@ RUN apk add --update bash curl wget iproute2 libc6-compat tzdata vim && \

ARG TARGETARCH
ARG HELM_VERSION
RUN wget -O helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz https://github.com/fluid-cloudnative/helm/releases/download/${HELM_VERSION}/helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz && \
tar -xvf helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz && \
mv linux-${TARGETARCH}/helm /usr/local/bin/ddc-helm && \
chmod u+x /usr/local/bin/ddc-helm && \
rm -f ${HELM_VERSION}-linux-${TARGETARCH}.tar.gz
COPY --from=builder /go/src/github.com/fluid-cloudnative/fluid/bin/helm/${HELM_VERSION}/helm-linux-${TARGETARCH} /usr/local/bin/ddc-helm
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

Using an absolute path for the COPY source is brittle and depends on the specific directory structure inside the builder stage. Since the WORKDIR is already set to /go/src/github.com/fluid-cloudnative/fluid, you can use a relative path.

COPY --from=builder bin/helm/${HELM_VERSION}/helm-linux-${TARGETARCH} /usr/local/bin/ddc-helm

RUN chmod u+x /usr/local/bin/ddc-helm
Comment on lines +22 to +23
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

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

This COPY --from=builder .../bin/helm/${HELM_VERSION}/helm-linux-${TARGETARCH} assumes the Helm binary already exists in the builder stage filesystem, but the builder stage only runs make alluxioruntime-controller-build and doesn't create/download that file. Unless bin/helm/... is provided in the build context ahead of time, docker build will fail here; consider adding a builder-stage step to populate it (e.g., run make download-helm and ensure curl/tar are available) or revert to downloading Helm during the image build.

Suggested change
COPY --from=builder /go/src/github.com/fluid-cloudnative/fluid/bin/helm/${HELM_VERSION}/helm-linux-${TARGETARCH} /usr/local/bin/ddc-helm
RUN chmod u+x /usr/local/bin/ddc-helm
RUN curl -fsSL "https://get.helm.sh/helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz" \
| tar -xzO "linux-${TARGETARCH}/helm" > /usr/local/bin/ddc-helm && \
chmod u+x /usr/local/bin/ddc-helm

Copilot uses AI. Check for mistakes.

COPY --from=builder /go/src/github.com/fluid-cloudnative/fluid/charts/ /charts

Expand Down
7 changes: 2 additions & 5 deletions docker/Dockerfile.application
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,8 @@ RUN apk add --update bash curl wget iproute2 libc6-compat tzdata vim && \

ARG TARGETARCH
ARG HELM_VERSION
RUN wget -O helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz https://github.com/fluid-cloudnative/helm/releases/download/${HELM_VERSION}/helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz && \
tar -xvf helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz && \
mv linux-${TARGETARCH}/helm /usr/local/bin/ddc-helm && \
chmod u+x /usr/local/bin/ddc-helm && \
rm -f ${HELM_VERSION}-linux-${TARGETARCH}.tar.gz
COPY --from=builder /go/src/github.com/fluid-cloudnative/fluid/bin/helm/${HELM_VERSION}/helm-linux-${TARGETARCH} /usr/local/bin/ddc-helm
RUN chmod u+x /usr/local/bin/ddc-helm
Comment on lines 22 to +25
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

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

This COPY --from=builder .../bin/helm/${HELM_VERSION}/helm-linux-${TARGETARCH} assumes the Helm binary already exists in the builder stage filesystem, but the builder stage only runs make application-controller-build and doesn't create/download that file. Unless bin/helm/... is provided in the build context ahead of time, docker build will fail here; consider adding a builder-stage step to populate it (e.g., run make download-helm and ensure curl/tar are available) or revert to downloading Helm during the image build.

Copilot uses AI. Check for mistakes.
Comment on lines 22 to +25
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

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

The repo only contains helm binaries under bin/helm/v3.19.5/, but this Dockerfile copies from bin/helm/${HELM_VERSION}. Any build that passes a different HELM_VERSION will fail at build time with a missing file. Either enforce a single HELM_VERSION across all builds, or add a builder-stage step that populates bin/helm/${HELM_VERSION} (e.g., via make download-helm).

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The Dockerfiles now copy Helm from bin/helm/${HELM_VERSION}/..., but this PR only vendors binaries under bin/helm/v3.19.5/. That means HELM_VERSION still looks configurable from the build interface, while in practice any non-vendored version will fail at build time with a missing file. Before this change, overriding HELM_VERSION still worked because the image downloaded the requested version during build. With the new layout, that behavior is effectively narrowed to the single vendored version unless download-helm is wired into the build flow. I think this should be addressed before merge: either make the build flow populate bin/helm/${HELM_VERSION} reliably, or explicitly lock the build interface to the vendored Helm version.


COPY --from=builder /go/src/github.com/fluid-cloudnative/fluid/charts/ /charts

Expand Down
7 changes: 2 additions & 5 deletions docker/Dockerfile.dataset
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,8 @@ RUN apk add --update bash curl wget iproute2 libc6-compat tzdata vim && \

ARG TARGETARCH
ARG HELM_VERSION
RUN wget -O helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz https://github.com/fluid-cloudnative/helm/releases/download/${HELM_VERSION}/helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz && \
tar -xvf helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz && \
mv linux-${TARGETARCH}/helm /usr/local/bin/ddc-helm && \
chmod u+x /usr/local/bin/ddc-helm && \
rm -f ${HELM_VERSION}-linux-${TARGETARCH}.tar.gz
COPY --from=builder /go/src/github.com/fluid-cloudnative/fluid/bin/helm/${HELM_VERSION}/helm-linux-${TARGETARCH} /usr/local/bin/ddc-helm
RUN chmod u+x /usr/local/bin/ddc-helm
Comment on lines 23 to +26
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

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

This COPY --from=builder .../bin/helm/${HELM_VERSION}/helm-linux-${TARGETARCH} assumes the Helm binary already exists in the builder stage filesystem, but the builder stage only runs make dataset-controller-build and doesn't create/download that file. Unless bin/helm/... is provided in the build context ahead of time, docker build will fail here; consider adding a builder-stage step to populate it (e.g., run make download-helm and ensure curl/tar are available) or revert to downloading Helm during the image build.

Copilot uses AI. Check for mistakes.

COPY --from=builder /go/src/github.com/fluid-cloudnative/fluid/charts/ /charts

Expand Down
7 changes: 2 additions & 5 deletions docker/Dockerfile.efcruntime
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,8 @@ RUN apk add --update bash curl wget iproute2 libc6-compat tzdata vim && \

ARG TARGETARCH
ARG HELM_VERSION
RUN wget -O helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz https://github.com/fluid-cloudnative/helm/releases/download/${HELM_VERSION}/helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz && \
tar -xvf helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz && \
mv linux-${TARGETARCH}/helm /usr/local/bin/ddc-helm && \
chmod u+x /usr/local/bin/ddc-helm && \
rm -f ${HELM_VERSION}-linux-${TARGETARCH}.tar.gz
COPY --from=builder /go/src/github.com/fluid-cloudnative/fluid/bin/helm/${HELM_VERSION}/helm-linux-${TARGETARCH} /usr/local/bin/ddc-helm
RUN chmod u+x /usr/local/bin/ddc-helm
Comment on lines 23 to +26
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

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

This COPY --from=builder .../bin/helm/${HELM_VERSION}/helm-linux-${TARGETARCH} assumes the Helm binary already exists in the builder stage filesystem, but the builder stage only runs make efcruntime-controller-build and doesn't create/download that file. Unless bin/helm/... is provided in the build context ahead of time, docker build will fail here; consider adding a builder-stage step to populate it (e.g., run make download-helm and ensure curl/tar are available) or revert to downloading Helm during the image build.

Copilot uses AI. Check for mistakes.
Comment on lines 23 to +26
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

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

The repo only contains helm binaries under bin/helm/v3.19.5/, but this Dockerfile copies from bin/helm/${HELM_VERSION}. Any build that passes a different HELM_VERSION will fail with a missing file. Either align build args to the vendored version, or add a builder-stage step that populates bin/helm/${HELM_VERSION} (e.g., make download-helm).

Copilot uses AI. Check for mistakes.

COPY --from=builder /go/src/github.com/fluid-cloudnative/fluid/charts/ /charts

Expand Down
7 changes: 2 additions & 5 deletions docker/Dockerfile.goosefsruntime
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,8 @@ RUN apk add --update bash curl wget iproute2 libc6-compat tzdata vim && \

ARG TARGETARCH
ARG HELM_VERSION
RUN wget -O helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz https://github.com/fluid-cloudnative/helm/releases/download/${HELM_VERSION}/helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz && \
tar -xvf helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz && \
mv linux-${TARGETARCH}/helm /usr/local/bin/ddc-helm && \
chmod u+x /usr/local/bin/ddc-helm && \
rm -f ${HELM_VERSION}-linux-${TARGETARCH}.tar.gz
COPY --from=builder /go/src/github.com/fluid-cloudnative/fluid/bin/helm/${HELM_VERSION}/helm-linux-${TARGETARCH} /usr/local/bin/ddc-helm
RUN chmod u+x /usr/local/bin/ddc-helm
Comment on lines +25 to +26
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

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

This COPY --from=builder .../bin/helm/${HELM_VERSION}/helm-linux-${TARGETARCH} assumes the Helm binary already exists in the builder stage filesystem, but the builder stage only runs make goosefsruntime-controller-build and doesn't create/download that file. Unless bin/helm/... is provided in the build context ahead of time, docker build will fail here; consider adding a builder-stage step to populate it (e.g., run make download-helm and ensure curl/tar are available) or revert to downloading Helm during the image build.

Suggested change
COPY --from=builder /go/src/github.com/fluid-cloudnative/fluid/bin/helm/${HELM_VERSION}/helm-linux-${TARGETARCH} /usr/local/bin/ddc-helm
RUN chmod u+x /usr/local/bin/ddc-helm
RUN curl -sSL "https://get.helm.sh/helm-v${HELM_VERSION}-linux-${TARGETARCH}.tar.gz" -o /tmp/helm.tgz && \
tar -xzf /tmp/helm.tgz -C /tmp && \
mv "/tmp/linux-${TARGETARCH}/helm" /usr/local/bin/ddc-helm && \
chmod u+x /usr/local/bin/ddc-helm && \
rm -rf /tmp/helm.tgz "/tmp/linux-${TARGETARCH}"

Copilot uses AI. Check for mistakes.
Comment on lines 23 to +26
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

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

The repo only contains helm binaries under bin/helm/v3.19.5/, but this Dockerfile copies from bin/helm/${HELM_VERSION}. Any build that passes a different HELM_VERSION will fail with a missing file. Either align build args to the vendored version, or add a builder-stage step that populates bin/helm/${HELM_VERSION} (e.g., make download-helm).

Copilot uses AI. Check for mistakes.

COPY --from=builder /go/src/github.com/fluid-cloudnative/fluid/charts/ /charts

Expand Down
7 changes: 2 additions & 5 deletions docker/Dockerfile.jindoruntime
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,8 @@ RUN apk add --update bash curl wget iproute2 libc6-compat tzdata vim && \

ARG TARGETARCH
ARG HELM_VERSION
RUN wget -O helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz https://github.com/fluid-cloudnative/helm/releases/download/${HELM_VERSION}/helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz && \
tar -xvf helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz && \
mv linux-${TARGETARCH}/helm /usr/local/bin/ddc-helm && \
chmod u+x /usr/local/bin/ddc-helm && \
rm -f ${HELM_VERSION}-linux-${TARGETARCH}.tar.gz
COPY --from=builder /go/src/github.com/fluid-cloudnative/fluid/bin/helm/${HELM_VERSION}/helm-linux-${TARGETARCH} /usr/local/bin/ddc-helm
RUN chmod u+x /usr/local/bin/ddc-helm
Comment on lines 20 to +23
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

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

This COPY --from=builder .../bin/helm/${HELM_VERSION}/helm-linux-${TARGETARCH} assumes the Helm binary already exists in the builder stage filesystem, but the builder stage only runs make jindoruntime-controller-build and doesn't create/download that file. Unless bin/helm/... is provided in the build context ahead of time, docker build will fail here; consider adding a builder-stage step to populate it (e.g., run make download-helm and ensure curl/tar are available) or revert to downloading Helm during the image build.

Copilot uses AI. Check for mistakes.
Comment on lines 20 to +23
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

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

The repo only contains helm binaries under bin/helm/v3.19.5/, but this Dockerfile copies from bin/helm/${HELM_VERSION}. Any build that passes a different HELM_VERSION will fail with a missing file. Either align build args to the vendored version, or add a builder-stage step that populates bin/helm/${HELM_VERSION} (e.g., make download-helm).

Copilot uses AI. Check for mistakes.

COPY --from=builder /go/src/github.com/fluid-cloudnative/fluid/charts/library /charts/library
COPY --from=builder /go/src/github.com/fluid-cloudnative/fluid/charts/jindofs /charts/jindofs
Expand Down
7 changes: 2 additions & 5 deletions docker/Dockerfile.juicefsruntime
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,8 @@ RUN apk add --update bash curl wget iproute2 libc6-compat tzdata vim && \

ARG TARGETARCH
ARG HELM_VERSION
RUN wget -O helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz https://github.com/fluid-cloudnative/helm/releases/download/${HELM_VERSION}/helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz && \
tar -xvf helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz && \
mv linux-${TARGETARCH}/helm /usr/local/bin/ddc-helm && \
chmod u+x /usr/local/bin/ddc-helm && \
rm -f ${HELM_VERSION}-linux-${TARGETARCH}.tar.gz
COPY --from=builder /go/src/github.com/fluid-cloudnative/fluid/bin/helm/${HELM_VERSION}/helm-linux-${TARGETARCH} /usr/local/bin/ddc-helm
RUN chmod u+x /usr/local/bin/ddc-helm
Comment on lines 25 to +28
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

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

This COPY --from=builder .../bin/helm/${HELM_VERSION}/helm-linux-${TARGETARCH} assumes the Helm binary already exists in the builder stage filesystem, but the builder stage only runs make juicefsruntime-controller-build and doesn't create/download that file. Unless bin/helm/... is provided in the build context ahead of time, docker build will fail here; consider adding a builder-stage step to populate it (e.g., run make download-helm and ensure curl/tar are available) or revert to downloading Helm during the image build.

Copilot uses AI. Check for mistakes.
Comment on lines 25 to +28
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

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

The repo only contains helm binaries under bin/helm/v3.19.5/, but this Dockerfile copies from bin/helm/${HELM_VERSION}. Any build that passes a different HELM_VERSION will fail with a missing file. Either align build args to the vendored version, or add a builder-stage step that populates bin/helm/${HELM_VERSION} (e.g., make download-helm).

Copilot uses AI. Check for mistakes.

COPY --from=builder /go/src/github.com/fluid-cloudnative/fluid/charts/ /charts

Expand Down
7 changes: 2 additions & 5 deletions docker/Dockerfile.thinruntime
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,8 @@ RUN apk add --update bash curl wget iproute2 libc6-compat tzdata vim && \

ARG TARGETARCH
ARG HELM_VERSION
RUN wget -O helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz https://github.com/fluid-cloudnative/helm/releases/download/${HELM_VERSION}/helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz && \
tar -xvf helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz && \
mv linux-${TARGETARCH}/helm /usr/local/bin/ddc-helm && \
chmod u+x /usr/local/bin/ddc-helm && \
rm -f ${HELM_VERSION}-linux-${TARGETARCH}.tar.gz
COPY --from=builder /go/src/github.com/fluid-cloudnative/fluid/bin/helm/${HELM_VERSION}/helm-linux-${TARGETARCH} /usr/local/bin/ddc-helm
RUN chmod u+x /usr/local/bin/ddc-helm
Comment on lines 23 to +26
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

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

This COPY --from=builder .../bin/helm/${HELM_VERSION}/helm-linux-${TARGETARCH} assumes the Helm binary already exists in the builder stage filesystem, but the builder stage only runs make thinruntime-controller-build and doesn't create/download that file. Unless bin/helm/... is provided in the build context ahead of time, docker build will fail here; consider adding a builder-stage step to populate it (e.g., run make download-helm and ensure curl/tar are available) or revert to downloading Helm during the image build.

Copilot uses AI. Check for mistakes.
Comment on lines 23 to +26
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

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

The repo only contains helm binaries under bin/helm/v3.19.5/, but this Dockerfile copies from bin/helm/${HELM_VERSION}. Any build that passes a different HELM_VERSION will fail with a missing file. Either align build args to the vendored version, or add a builder-stage step that populates bin/helm/${HELM_VERSION} (e.g., make download-helm).

Copilot uses AI. Check for mistakes.

COPY --from=builder /go/src/github.com/fluid-cloudnative/fluid/charts/ /charts

Expand Down
7 changes: 2 additions & 5 deletions docker/Dockerfile.vineyardruntime
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,8 @@ RUN apk add --update bash curl wget iproute2 libc6-compat tzdata vim && \

ARG TARGETARCH
ARG HELM_VERSION
RUN wget -O helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz https://github.com/fluid-cloudnative/helm/releases/download/${HELM_VERSION}/helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz && \
tar -xvf helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz && \
mv linux-${TARGETARCH}/helm /usr/local/bin/ddc-helm && \
chmod u+x /usr/local/bin/ddc-helm && \
rm -f ${HELM_VERSION}-linux-${TARGETARCH}.tar.gz
COPY --from=builder /go/src/github.com/fluid-cloudnative/fluid/bin/helm/${HELM_VERSION}/helm-linux-${TARGETARCH} /usr/local/bin/ddc-helm
RUN chmod u+x /usr/local/bin/ddc-helm
Comment on lines +22 to +23
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

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

This COPY --from=builder .../bin/helm/${HELM_VERSION}/helm-linux-${TARGETARCH} assumes the Helm binary already exists in the builder stage filesystem, but the builder stage only runs make vineyardruntime-controller-build and doesn't create/download that file. Unless bin/helm/... is provided in the build context ahead of time, docker build will fail here; consider adding a builder-stage step to populate it (e.g., run make download-helm and ensure curl/tar are available) or revert to downloading Helm during the image build.

Suggested change
COPY --from=builder /go/src/github.com/fluid-cloudnative/fluid/bin/helm/${HELM_VERSION}/helm-linux-${TARGETARCH} /usr/local/bin/ddc-helm
RUN chmod u+x /usr/local/bin/ddc-helm
RUN curl -fsSL "https://get.helm.sh/helm-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz" -o /tmp/helm.tgz && \
tar -xz -C /tmp -f /tmp/helm.tgz && \
mv "/tmp/linux-${TARGETARCH}/helm" /usr/local/bin/ddc-helm && \
chmod u+x /usr/local/bin/ddc-helm && \
rm -rf /tmp/helm.tgz "/tmp/linux-${TARGETARCH}"

Copilot uses AI. Check for mistakes.
Comment on lines 20 to +23
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

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

The repo only contains helm binaries under bin/helm/v3.19.5/, but this Dockerfile copies from bin/helm/${HELM_VERSION}. Any build that passes a different HELM_VERSION will fail with a missing file. Either align build args to the vendored version, or add a builder-stage step that populates bin/helm/${HELM_VERSION} (e.g., make download-helm).

Copilot uses AI. Check for mistakes.

COPY --from=builder /go/src/github.com/fluid-cloudnative/fluid/charts/ /charts

Expand Down
Loading