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 a915b0f commit 96e3422Copy full SHA for 96e3422
cmd/gcp/Dockerfile
@@ -0,0 +1,24 @@
1
+FROM golang:1.23.1-alpine3.19@sha256:ac67716dd016429be8d4c2c53a248d7bcdf06d34127d3dc451bda6aa5a87bc06 AS builder
2
+
3
+ARG GOFLAGS="-trimpath -buildvcs=false -buildmode=exe"
4
+ENV GOFLAGS=$GOFLAGS
5
6
+# Move to working directory /build
7
+WORKDIR /build
8
9
+# Copy and download dependency using go mod
10
+COPY go.mod .
11
+COPY go.sum .
12
+RUN go mod download
13
14
+# Copy the code into the container
15
+COPY . .
16
17
+# Build the application
18
+RUN go build -o bin/sctfe-gcp ./cmd/gcp
19
20
+# Build release image
21
+FROM alpine:3.20.2@sha256:0a4eaa0eecf5f8c050e5bba433f58c052be7587ee8af3e8b3910ef9ab5fbe9f5
22
23
+COPY --from=builder /build/bin/sctfe-gcp /bin/sctfe-gcp
24
+ENTRYPOINT ["/bin/sctfe-gcp"]
0 commit comments