Skip to content
Merged
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
12 changes: 4 additions & 8 deletions docker/Dockerfile.cacheruntime
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,17 @@ RUN make cacheruntime-controller-build && \
cp bin/cacheruntime-controller /go/bin/cacheruntime-controller
RUN bash hack/helm/pin_runtime_chart_version.sh "${FLUID_VERSION}"

# alpine:3.20.6
FROM alpine:3.20.6@sha256:de4fe7064d8f98419ea6b49190df1abbf43450c1702eeb864fe9ced453c1cc5f
# alpine:3.23.3
FROM alpine:3.23.3@sha256:25109184c71bdad752c8312a8623239686a9a2071e8825f20acb8f2198c3f659
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.

high

The Alpine version 3.23.3 is invalid as Alpine Linux has not released a version 3.23 (the current latest stable is 3.21). This will cause the image build to fail during the base image pull. Based on the SHA provided, it is highly likely that 3.21.3 was intended.

# alpine:3.21.3
FROM alpine:3.21.3@sha256:25109184c71bdad752c8312a8623239686a9a2071e8825f20acb8f2198c3f659

RUN apk add --update bash curl wget iproute2 libc6-compat tzdata vim && \
rm -rf /var/cache/apk/* && \
cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
echo "Asia/Shanghai" > /etc/timezone

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-${HELM_VERSION}-linux-${TARGETARCH}.tar.gz && \
rm -rf linux-${TARGETARCH}
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.

high

This change makes the Docker build dependent on the Helm binary being present in the local bin/ directory of the build context. However, the Makefile does not currently ensure that make download-helm is executed before docker-build-cacheruntime-controller. This will cause builds to fail in clean environments or CI pipelines where the binary hasn't been manually downloaded. To fix this, you should update the Makefile to include download-helm as a dependency for the Docker build targets.

RUN chmod u+x /usr/local/bin/ddc-helm

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

Expand Down
Loading