-
-
Notifications
You must be signed in to change notification settings - Fork 831
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docker: add Dockerfile and .dockerignore.
The Dockerfile produces a scratch image with a statically linked binary without debug flag.
- Loading branch information
1 parent
6411d31
commit 5a7e929
Showing
2 changed files
with
14 additions
and
0 deletions.
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,6 @@ | ||
* | ||
!go.mod | ||
!go.sum | ||
!*.go | ||
!Makefile | ||
!internal/* |
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,8 @@ | ||
FROM golang:1.14 AS builder | ||
WORKDIR /go/src/github.com/adnanh/webhook/ | ||
COPY . ./ | ||
RUN make CGO_ENABLED=0 LDFLAGS="-w -s" build | ||
|
||
FROM scratch | ||
COPY --from=builder /go/src/github.com/adnanh/webhook/webhook /bin/ | ||
ENTRYPOINT ["/bin/webhook"] |