-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
257 additions
and
222 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,27 @@ | ||
# ----------------------------------------------------------------------------- | ||
# The base image for building the k9s binary | ||
|
||
FROM golang:1.23-alpine3.20 AS build | ||
FROM golang:1.23.3-alpine3.20 AS build | ||
|
||
WORKDIR /k9s | ||
COPY go.mod go.sum main.go Makefile ./ | ||
COPY internal internal | ||
COPY cmd cmd | ||
RUN apk --no-cache add --update make libx11-dev git gcc libc-dev curl && make build | ||
RUN apk --no-cache add --update make libx11-dev git gcc libc-dev curl \ | ||
&& make build | ||
|
||
# ----------------------------------------------------------------------------- | ||
# Build the final Docker image | ||
|
||
FROM alpine:3.20.3 | ||
ARG KUBECTL_VERSION="v1.29.0" | ||
ARG KUBECTL_VERSION="v1.31.2" | ||
|
||
COPY --from=build /k9s/execs/k9s /bin/k9s | ||
RUN apk add --update ca-certificates \ | ||
&& apk add --update -t deps curl vim \ | ||
RUN apk --no-cache add --update ca-certificates \ | ||
&& apk --no-cache add --update -t deps curl vim \ | ||
&& TARGET_ARCH=$(arch | sed s/aarch64/arm64/ | sed s/x86_64/amd64/) \ | ||
&& curl -L https://storage.googleapis.com/kubernetes-release/release/${KUBECTL_VERSION}/bin/linux/${TARGET_ARCH}/kubectl -o /usr/local/bin/kubectl \ | ||
&& chmod +x /usr/local/bin/kubectl \ | ||
&& apk del --purge deps \ | ||
&& rm /var/cache/apk/* | ||
&& apk del --purge deps | ||
|
||
ENTRYPOINT [ "/bin/k9s" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.