Skip to content

Commit ecd565d

Browse files
committed
make kubectl version explicit
Signed-off-by: Soule <[email protected]>
1 parent 84d49cb commit ecd565d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,10 @@ WORKDIR /workspace
2222
# Add kubectl tool
2323
# Using the $ARCH in the name of the binary here ensures we don't get any cross-arch caching after this binary is downloaded.
2424
ARG ARCH
25-
RUN curl -L "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/${ARCH}/kubectl" -o kubectl-${ARCH}
26-
RUN chmod +x ./kubectl-${ARCH}
25+
# kubectl latest version can be retrieved by curl -L -s https://dl.k8s.io/release/stable.txt
26+
ARG KUBECTL_VERSION=v1.31.1
27+
RUN curl -L "https://dl.k8s.io/release/${KUBECTL_VERSION}/bin/linux/${ARCH}/kubectl" -o kubectl-${ARCH} && \
28+
chmod +x ./kubectl-${ARCH}
2729

2830
# Copy the Go Modules manifests
2931
COPY go.mod go.mod

0 commit comments

Comments
 (0)