Skip to content

Commit

Permalink
Merge pull request #102 from kcajmagic/addDockerBuild
Browse files Browse the repository at this point in the history
add docker build to travis build
  • Loading branch information
kcajmagic authored Nov 30, 2018
2 parents ce1a924 + 73e19fd commit 87dd98a
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ after_success:
- docker cp build:/versionno.txt .
- BINARY_NAME=`ls x86_64/`
- TRAVIS_TAG=`cat versionno.txt`
- 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then docker build -t caduceus:local .; fi'


deploy:
provider: releases
Expand Down
21 changes: 21 additions & 0 deletions Dockerfile.local
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM golang:alpine as builder
MAINTAINER Jack Murdock <[email protected]>

# build the binary
WORKDIR /go/src
COPY src/ /go/src/

RUN go build -o caduceus_linux_amd64 caduceus

EXPOSE 6000 6001 6002
RUN mkdir -p /etc/caduceus
VOLUME /etc/caduceus

# the actual image
FROM alpine:latest
RUN apk --no-cache add ca-certificates
RUN mkdir -p /etc/caduceus
VOLUME /etc/caduceus
WORKDIR /root/
COPY --from=builder /go/src/caduceus_linux_amd64 .
ENTRYPOINT ["./caduceus_linux_amd64"]

0 comments on commit 87dd98a

Please sign in to comment.