Skip to content

Commit

Permalink
Merge pull request #5 from serbrech/docker-build
Browse files Browse the repository at this point in the history
Add docker build
  • Loading branch information
lawrencegripper authored Dec 6, 2017
2 parents 5081433 + 2a8a66d commit 0f38c20
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
vendor
19 changes: 19 additions & 0 deletions Dockerfile
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"]
1 change: 1 addition & 0 deletions build.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
docker build . -t traefik-appinsights-watchdog
2 changes: 2 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#/bin/sh
docker build . -t traefik-appinsights-watchdog

0 comments on commit 0f38c20

Please sign in to comment.