Skip to content

Commit 2c48026

Browse files
authored
Bump go version to 1.24.1. (#429)
1 parent eb950a0 commit 2c48026

File tree

1 file changed

+11
-28
lines changed

1 file changed

+11
-28
lines changed

tools/Dockerfile-kjob

Lines changed: 11 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -12,39 +12,22 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
16-
# Use a google-cloud-cli image as the base
17-
ARG BASE_IMAGE=gcr.io/google.com/cloudsdktool/google-cloud-cli:stable
18-
FROM ${BASE_IMAGE}
15+
FROM golang:1.24.1-alpine
1916

2017
# Install necessary tools and libraries
21-
RUN apt-get update && \
22-
apt-get install -y --no-install-recommends \
23-
apt-transport-https \
24-
ca-certificates \
25-
curl \
26-
gnupg \
27-
lsb-release \
28-
git \
29-
make \
30-
unzip \
31-
wget
32-
33-
# Install Go
34-
ARG GO_VERSION=1.23.0
35-
RUN wget -q "https://go.dev/dl/go${GO_VERSION}.linux-amd64.tar.gz" -O go.tar.gz && \
36-
tar -C /usr/local -xzf go.tar.gz && \
37-
rm go.tar.gz
38-
39-
# Set GOPATH and add to PATH
40-
ENV GOPATH /go
41-
ENV PATH $PATH:/usr/local/go/bin:$GOPATH/bin
18+
RUN apk add git make bash
4219

43-
# Clone the kjob repository
4420
ARG KJOB_BRANCH=main
45-
RUN git clone --branch ${KJOB_BRANCH} https://github.com/kubernetes-sigs/kjob.git /kjob
21+
ARG KJOB_COMMIT_HASH=e2c92af44c047016cd5789995f6276b79f22663d
22+
23+
# Clone the kjob repository
24+
RUN git clone --branch ${KJOB_BRANCH} --single-branch https://github.com/kubernetes-sigs/kjob.git /kjob
4625

47-
# Build the gcluster binary
4826
WORKDIR /kjob
27+
28+
# Checkout to stable commit
29+
RUN git checkout ${KJOB_COMMIT_HASH}
30+
31+
# Build the kubectl-kjob binary
4932
RUN make kubectl-kjob
5033

0 commit comments

Comments
 (0)