Skip to content

Commit

Permalink
Bump to go 1.20 (#836)
Browse files Browse the repository at this point in the history
Switch the base images used for the Docker build to specify the golang
version, so we know what we're building for and can trigger rebuilds
when needed.
  • Loading branch information
iainlane authored Apr 25, 2023
1 parent 3f03272 commit 6c21f57
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# download kubectl
FROM golang:alpine3.16 as kubectl
FROM golang:1.20.3-alpine as kubectl
RUN apk add --no-cache curl
RUN export VERSION=$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt) &&\
export OS=$(go env GOOS) && \
Expand All @@ -8,7 +8,7 @@ RUN export VERSION=$(curl -s https://storage.googleapis.com/kubernetes-release/r
chmod +x /usr/local/bin/kubectl

# build jsonnet-bundler
FROM golang:alpine3.16 as jb
FROM golang:1.20.3-alpine as jb
WORKDIR /tmp
RUN apk add --no-cache git make bash &&\
git clone https://github.com/jsonnet-bundler/jsonnet-bundler &&\
Expand All @@ -17,7 +17,7 @@ RUN apk add --no-cache git make bash &&\
make static &&\
mv _output/jb /usr/local/bin/jb

FROM golang:alpine3.16 as helm
FROM golang:1.20.3-alpine as helm
WORKDIR /tmp/helm
RUN apk add --no-cache jq curl
RUN export TAG=$(curl --silent "https://api.github.com/repos/helm/helm/releases/latest" | jq -r .tag_name) &&\
Expand All @@ -26,7 +26,7 @@ RUN export TAG=$(curl --silent "https://api.github.com/repos/helm/helm/releases/
curl -SL "https://get.helm.sh/helm-${TAG}-${OS}-${ARCH}.tar.gz" > helm.tgz && \
tar -xvf helm.tgz --strip-components=1

FROM golang:alpine3.16 as kustomize
FROM golang:1.20.3-alpine as kustomize
WORKDIR /tmp/kustomize
RUN apk add --no-cache jq curl
# Get the latest version of kustomize
Expand All @@ -40,7 +40,7 @@ RUN export TAG=$(curl --silent "https://api.github.com/repos/kubernetes-sigs/kus
tar -xvf kustomize.tgz

# assemble final container
FROM alpine:3.16
FROM alpine:3.17
RUN apk add --no-cache coreutils diffutils less git openssh-client
COPY tk /usr/local/bin/tk
COPY --from=kubectl /usr/local/bin/kubectl /usr/local/bin/kubectl
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/grafana/tanka

go 1.19
go 1.20

require (
github.com/Masterminds/semver v1.5.0
Expand Down

0 comments on commit 6c21f57

Please sign in to comment.