Skip to content

Commit

Permalink
Add Docker builder
Browse files Browse the repository at this point in the history
  • Loading branch information
Eugene Dementiev committed May 17, 2018
1 parent f9a79e2 commit 1306d02
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
vendor/
Dockerfile.build
build.sh
13 changes: 13 additions & 0 deletions Dockerfile.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM golang:1.10-alpine as build

RUN apk update && apk add git
RUN go get -u github.com/golang/dep/cmd/dep

WORKDIR /go/src/github.com/springload/ssm-parent

ADD Gopkg.lock Gopkg.toml ./

RUN dep ensure -vendor-only

ADD ./ ./
RUN go build
4 changes: 4 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh

docker build -t ssm-parent -f Dockerfile.build .
docker run --rm -v "$(pwd):/tmp/builder" ssm-parent cp ssm-parent /tmp/builder

0 comments on commit 1306d02

Please sign in to comment.