Skip to content

Commit e44a69f

Browse files
committedOct 26, 2020
Added Dockerfile
1 parent a70c7c2 commit e44a69f

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed
 

‎Dockerfile

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# build stage
2+
FROM golang:1.15 as builder
3+
ENV GO111MODULE=on
4+
5+
WORKDIR /app
6+
7+
COPY go.mod .
8+
COPY go.sum .
9+
10+
RUN go mod download
11+
12+
COPY . .
13+
14+
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o domainik-binary
15+
16+
FROM alpine:3.10 as certs
17+
RUN apk add ca-certificates && update-ca-certificates
18+
19+
# final stage
20+
FROM scratch
21+
COPY --from=builder /app/domainik-binary /app/
22+
COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
23+
ENTRYPOINT ["/app/domainik-binary"]

0 commit comments

Comments
 (0)
Please sign in to comment.