We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2145e80 commit 04194d0Copy full SHA for 04194d0
Dockerfile
@@ -0,0 +1,25 @@
1
+# syntax=docker/dockerfile:1.1.7-experimental
2
+
3
+# Environment to build manager binary
4
+FROM golang:1.15.6-alpine3.12 as build
5
+WORKDIR /gin
6
7
+RUN apk update && apk add gcc musl-dev
8
9
+COPY . .
10
11
+RUN go mod download
12
13
+RUN go build -ldflags '-w -s' -a -o ./bin/porter-gin-example .
14
15
+# Deployment environment
16
+# ----------------------
17
+FROM alpine:3.12
18
19
20
+RUN apk update && apk add git curl
21
22
+COPY --from=build /gin/bin/porter-gin-example /usr/bin/
23
24
+ENTRYPOINT [ "porter-gin-example" ]
25
0 commit comments