Skip to content

Commit

Permalink
Merge pull request #1057 from crazy-max/pin-alpine
Browse files Browse the repository at this point in the history
dockerfile: pin alpine version for golang image
  • Loading branch information
crazy-max authored Dec 15, 2023
2 parents 9a736e8 + 17dec01 commit 402e0bf
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ARG XX_VERSION="1.2.1"

FROM --platform=$BUILDPLATFORM tonistiigi/xx:${XX_VERSION} AS xx

FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-alpine AS base
FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-alpine${ALPINE_VERSION} AS base
COPY --from=xx / /
ENV CGO_ENABLED=0
RUN apk add --no-cache file git
Expand Down
3 changes: 2 additions & 1 deletion hack/lint.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# syntax=docker/dockerfile:1

ARG GO_VERSION="1.21"
ARG ALPINE_VERSION="3.18"
ARG GOLANGCI_LINT_VERSION="v1.55"

FROM golang:${GO_VERSION}-alpine AS base
FROM golang:${GO_VERSION}-alpine${ALPINE_VERSION} AS base
ENV GOFLAGS="-buildvcs=false"
RUN apk add --no-cache gcc linux-headers musl-dev
WORKDIR /src
Expand Down
3 changes: 2 additions & 1 deletion hack/vendor.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# syntax=docker/dockerfile:1

ARG GO_VERSION="1.21"
ARG ALPINE_VERSION="3.18"
ARG GOMOD_OUTDATED_VERSION="v0.8.0"

FROM golang:${GO_VERSION}-alpine AS base
FROM golang:${GO_VERSION}-alpine${ALPINE_VERSION} AS base
RUN apk add --no-cache git linux-headers musl-dev
WORKDIR /src

Expand Down

0 comments on commit 402e0bf

Please sign in to comment.