fix: upgrade Go image version to 1.23.4
This commit is contained in:
parent
a2bef2ca90
commit
55354e1fb3
22
Dockerfile
22
Dockerfile
@ -1,12 +1,26 @@
|
|||||||
# Build stage
|
########################
|
||||||
FROM golang:1.22-alpine AS builder
|
# — Build stage —
|
||||||
|
########################
|
||||||
|
FROM golang:1.23.4-alpine AS builder
|
||||||
|
|
||||||
|
# git is needed to fetch modules and root CAs
|
||||||
|
RUN apk add --no-cache git ca-certificates
|
||||||
|
|
||||||
WORKDIR /src
|
WORKDIR /src
|
||||||
COPY go.* ./
|
|
||||||
|
# Copy *both* dependency files first so Docker-layer caching works
|
||||||
|
COPY go.mod go.sum ./
|
||||||
RUN go mod download
|
RUN go mod download
|
||||||
|
|
||||||
|
# Bring in the rest of the source
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
|
# Build static binary
|
||||||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o /out/action ./main.go
|
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o /out/action ./main.go
|
||||||
|
|
||||||
# Runtime Stage
|
########################
|
||||||
|
# — Runtime stage —
|
||||||
|
########################
|
||||||
FROM alpine:3.20
|
FROM alpine:3.20
|
||||||
COPY --from=builder /out/action /usr/local/bin/action
|
COPY --from=builder /out/action /usr/local/bin/action
|
||||||
ENTRYPOINT ["/usr/local/bin/action"]
|
ENTRYPOINT ["/usr/local/bin/action"]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user