-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
26 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
FROM golang:1.14 AS builder | ||
WORKDIR /build | ||
ADD main.go main.go | ||
ADD go.mod go.mod | ||
ADD cmd cmd | ||
ADD pkg pkg | ||
|
||
# Fetch dependencies | ||
RUN go mod download | ||
|
||
# Build image as a truly static Go binary | ||
RUN CGO_ENABLED=0 GOOS=linux go build -o /multi-git -a -tags netgo -ldflags '-s -w' . | ||
|
||
FROM alpine/git | ||
MAINTAINER Gigi Sayfan <the.gigi@gmail.com> | ||
COPY --from=builder /multi-git /multi-git | ||
ENTRYPOINT ["/multi-git"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters