File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed
Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change 11FROM golang:1.26-alpine AS builder
22
3- RUN apk add --no-cache gcc musl-dev sqlite-dev make
3+ RUN apk add --no-cache gcc musl-dev sqlite-dev make ca-certificates
44
55WORKDIR /app
66
@@ -9,16 +9,15 @@ COPY go.mod go.sum ./
99COPY . .
1010
1111ARG COMMIT_HASH
12- RUN CGO_ENABLED=1 go build -ldflags="-X github.com/lnliz/faucet.coinbin.org/service.CommitHash=${COMMIT_HASH}" -o app .
12+ RUN CGO_ENABLED=1 go build -ldflags="-X github.com/lnliz/faucet.coinbin.org/service.CommitHash=${COMMIT_HASH} -linkmode external -extldflags '-static' " -o app .
1313
14- FROM alpine:3.23
14+ FROM scratch
1515
16- RUN apk add --no-cache sqlite-libs
16+ COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
17+ COPY --from=builder /app/app /app/app
18+ COPY --from=builder /app/templates /app/templates
19+ COPY --from=builder /app/static /app/static
1720
1821WORKDIR /app
1922
20- COPY --from=builder /app/app .
21- COPY --from=builder /app/templates ./templates
22- COPY --from=builder /app/static ./static
23-
2423ENTRYPOINT ["/app/app" ]
You can’t perform that action at this time.
0 commit comments