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 cf89cc0 commit 05b034eCopy full SHA for 05b034e
Dockerfile
@@ -0,0 +1,30 @@
1
+ARG GO_VERSION=1.19.1
2
+
3
+FROM golang:${GO_VERSION}-alpine AS builder
4
5
+RUN go env -w GOPROXY=direct
6
+RUN apk add --no-cache git
7
+RUN apk --no-cache add ca-certificates && update-ca-certificates
8
9
+WORKDIR /src
10
11
+COPY ./go.mod ./go.sum ./
12
+RUN go mod download
13
14
+COPY ./ ./
15
16
+RUN CGO_ENABLED=0 go build \
17
+ -installsuffix 'static' \
18
+ -o /API-REST_GO
19
20
+FROM scratch AS runner
21
22
+COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
23
24
+COPY .env ./
25
26
+COPY --from=builder /API-REST_GO /API-REST_GO
27
28
+EXPOSE 5050
29
30
+ENTRYPOINT ["/API-REST_GO"]
0 commit comments