diff --git a/.travis.yml b/.travis.yml index 8532002..d0bc237 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,12 +1,10 @@ -language: go +language: minimal -go: - - stable +services: + - docker -# Go module behaviour is disabled by default for packages inside GOPATH. -# Turn module support on explicitly: -env: - - GO111MODULE=on +script: + - make docker-build deploy: - provider: script diff --git a/Dockerfile b/Dockerfile index 736b147..eee3c56 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,8 +2,8 @@ FROM golang:1.12-stretch AS build WORKDIR /go/src/github.com/mpolden/echoip COPY . . -ENV GO111MODULE=on CGO_ENABLED=0 -RUN go install ./... +ENV GO111MODULE=on +RUN make # Run FROM scratch diff --git a/Makefile b/Makefile index ab606a4..6c234b5 100644 --- a/Makefile +++ b/Makefile @@ -39,5 +39,5 @@ docker-build: docker-login: @echo "$(DOCKER_PASSWORD)" | docker login -u "$(DOCKER_USERNAME)" --password-stdin -docker-push: docker-build docker-login +docker-push: docker-login docker push $(DOCKER_IMAGE)