Skip to content

Commit

Permalink
Build docker images with go1.17 (#2188)
Browse files Browse the repository at this point in the history
  • Loading branch information
Darlez committed Aug 19, 2021
1 parent 43b941d commit d3705d0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ fast_generate: assets/github-action-config.json

fast_check_generated:
$(MAKE) --always-make fast_generate
git checkout -- go.mod go.sum # can differ between go1.15 and go1.16
git checkout -- go.mod go.sum # can differ between go1.16 and go1.17
git diff --exit-code # check no changes

release: .goreleaser.yml tools/goreleaser
Expand Down
4 changes: 2 additions & 2 deletions build/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# stage 1 building the code
FROM golang:1.16 as builder
FROM golang:1.17 as builder

ARG VERSION
ARG SHORT_COMMIT
Expand All @@ -10,7 +10,7 @@ WORKDIR /golangci
RUN CGO_ENABLED=0 go build -trimpath -ldflags "-s -w -X main.version=$VERSION -X main.commit=$SHORT_COMMIT -X main.date=$DATE" -o golangci-lint ./cmd/golangci-lint/main.go

# stage 2
FROM golang:1.16
FROM golang:1.17
# don't place it into $GOPATH/bin because Drone mounts $GOPATH as volume
COPY --from=builder /golangci/golangci-lint /usr/bin/
CMD ["golangci-lint"]
4 changes: 2 additions & 2 deletions build/Dockerfile.alpine
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# stage 1 building the code
FROM golang:1.16-alpine as builder
FROM golang:1.17-alpine as builder

ARG VERSION
ARG SHORT_COMMIT
Expand All @@ -15,7 +15,7 @@ RUN apk --no-cache add gcc musl-dev git mercurial
RUN CGO_ENABLED=0 go build -trimpath -ldflags "-s -w -X main.version=$VERSION -X main.commit=$SHORT_COMMIT -X main.date=$DATE" -o golangci-lint ./cmd/golangci-lint/main.go

# stage 2
FROM golang:1.16-alpine
FROM golang:1.17-alpine
# gcc is required to support cgo;
# git and mercurial are needed most times for go get`, etc.
# See https://github.com/docker-library/golang/issues/80
Expand Down

0 comments on commit d3705d0

Please sign in to comment.