-
Notifications
You must be signed in to change notification settings - Fork 4
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 #5 from serbrech/docker-build
Add docker build
- Loading branch information
Showing
4 changed files
with
23 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 @@ | ||
vendor |
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,19 @@ | ||
# build stage | ||
FROM ataraev/golang-alpine-git AS build-env | ||
ENV GOBIN /go/bin | ||
RUN apk add --update openssl && \ | ||
wget -O /go/bin/dep http://github.com/golang/dep/releases/download/v0.3.2/dep-linux-amd64 && \ | ||
chmod +x /go/bin/dep | ||
|
||
COPY ./Gopkg.* /go/src/github.com/lawrencegripper/traefik-appinsights-watchdog/ | ||
WORKDIR /go/src/github.com/lawrencegripper/traefik-appinsights-watchdog | ||
RUN dep ensure --vendor-only -v | ||
|
||
COPY . /go/src/github.com/lawrencegripper/traefik-appinsights-watchdog/ | ||
RUN go build -o traefik-appinsights-watchdog -v | ||
|
||
# final stage | ||
FROM golang:alpine | ||
WORKDIR /app | ||
COPY --from=build-env /go/src/github.com/lawrencegripper/traefik-appinsights-watchdog/traefik-appinsights-watchdog . | ||
ENTRYPOINT ["./traefik-appinsights-watchdog"] |
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 @@ | ||
docker build . -t traefik-appinsights-watchdog |
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,2 @@ | ||
#/bin/sh | ||
docker build . -t traefik-appinsights-watchdog |