Skip to content

Commit 1b716dd

Browse files
committed
chore: go mod update
1 parent 664c4e7 commit 1b716dd

File tree

1 file changed

+4
-23
lines changed

1 file changed

+4
-23
lines changed

Dockerfile

Lines changed: 4 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,11 @@
1-
FROM golang:1.25-alpine3.22 as builder
2-
WORKDIR /app
3-
COPY . .
4-
RUN
5-
RUN go build -ldflags "-s -w" -o main main.go
6-
7-
FROM alpine:3.22
8-
RUN apk update
9-
RUN apk upgrade --no-cache libcrypto3 libssl3 openssl
10-
RUN apk --no-cache add ca-certificates
11-
RUN addgroup -S app && adduser -S app -G app
12-
WORKDIR /app
13-
COPY --from=builder /app/main .
14-
USER app
15-
ENTRYPOINT ["./main"]
16-
17-
18-
FROM --platform=$BUILDPLATFORM golang:1.25-alpine3.22 as builder
1+
FROM golang:1.25-alpine3.22 AS builder
192
ARG TARGETOS TARGETARCH TARGETVARIANT
203
WORKDIR /app
214
COPY . .
22-
RUN CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH go build -ldflags "-s -w" -o main main.go
5+
RUN CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH go build -ldflags "-s -w" -o main main.go
236

24-
FROM --platform=$TARGETPLATFORM alpine:3.22
25-
RUN apk update
26-
RUN apk upgrade --no-cache libcrypto3 libssl3 openssl
27-
RUN apk --no-cache add ca-certificates
7+
FROM alpine:3.22
8+
RUN apk update && apk upgrade --no-cache libcrypto3 libssl3 openssl && apk --no-cache add ca-certificates
289
RUN addgroup -S app && adduser -S app -G app
2910
WORKDIR /app
3011
COPY --from=builder /app/main .

0 commit comments

Comments
 (0)