Skip to content

Commit

Permalink
fix: update base images (golangci#2661)
Browse files Browse the repository at this point in the history
  • Loading branch information
ldez authored and SeigeC committed Apr 4, 2023
1 parent 7b541bd commit 8c2330a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions build/Dockerfile
@@ -1,5 +1,5 @@
# stage 1 building the code
FROM golang:1.17 as builder
FROM golang:1.18 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.17
FROM golang:1.18
# 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
@@ -1,5 +1,5 @@
# stage 1 building the code
FROM golang:1.17-alpine as builder
FROM golang:1.18-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.17-alpine
FROM golang:1.18-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 8c2330a

Please sign in to comment.