We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent abed2c0 commit 0a4f997Copy full SHA for 0a4f997
1 file changed
Dockerfile
@@ -0,0 +1,14 @@
1
+# The build stage
2
+FROM golang:1.22 as builder
3
+WORKDIR /app
4
+COPY . .
5
+RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o api cmd/api/*.go
6
+
7
+# The run stage
8
+FROM scratch
9
10
+# Copy CA certificates
11
+COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
12
+COPY --from=builder /app/api .
13
+EXPOSE 8080
14
+CMD ["./api"]
0 commit comments