We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c5f293a commit 718b4e6Copy full SHA for 718b4e6
1 file changed
Dockerfile
@@ -1,5 +1,8 @@
1
+ARG BUILDTIME_IMAGE=golang:1.24.2-alpine3.20
2
+ARG RUNTIME_IMAGE=scratch
3
+
4
###############################################################################
-FROM golang:1.24.2-alpine3.20 AS init
5
+FROM ${BUILDTIME_IMAGE} AS init
6
7
ENV CGO_ENABLED=0
8
RUN apk add --update --no-cache make
@@ -129,8 +132,7 @@ CMD ["make", "test"]
129
132
## https://shakib37.medium.com/distroless-as-the-final-container-base-image-b8af961fc826
130
133
## https://chemidy.medium.com/create-the-smallest-and-secured-golang-docker-image-based-on-scratch-4752223b7324
131
134
-FROM scratch AS production
-# FROM alpine:3.20.0 AS production
135
+FROM ${RUNTIME_IMAGE} AS production
136
137
ENV WORKDIR=/app
138
WORKDIR ${WORKDIR}
0 commit comments