-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from krasi-georgiev/dockerfile
use multistage builds and build inside a container
- Loading branch information
Showing
4 changed files
with
23 additions
and
6 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
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 |
---|---|---|
@@ -1,9 +1,14 @@ | ||
FROM golang:1.8 | ||
FROM golang:1.10 | ||
|
||
ADD . /go/src/github.com/m-lab/alertmanager-github-receiver | ||
WORKDIR /go/src/github.com/m-lab/alertmanager-github-receiver | ||
ADD . ./ | ||
|
||
# TODO(soltesz): vendor dependencies. | ||
RUN go get -v github.com/m-lab/alertmanager-github-receiver/cmd/github_receiver | ||
# TODO(soltesz): Use vgo for dependencies. | ||
RUN CGO_ENABLED=0 go get -v github.com/m-lab/alertmanager-github-receiver/cmd/github_receiver | ||
|
||
# RUN go install -v | ||
ENTRYPOINT ["/go/bin/github_receiver"] | ||
FROM alpine | ||
RUN apk add --no-cache ca-certificates && \ | ||
update-ca-certificates | ||
WORKDIR / | ||
COPY --from=0 /go/bin/github_receiver ./ | ||
ENTRYPOINT ["/github_receiver"] |
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,3 @@ | ||
docker: | ||
@docker build -t $(DOCKER_TAG) . | ||
@docker push $(DOCKER_TAG) |
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