Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Garret Picchioni 2019-04-01 11:48:00 -07:00
commit afd8b1bd47
No known key found for this signature in database
GPG Key ID: AFB3DB1A44B980C2
2 changed files with 8 additions and 2 deletions

View File

@ -2,7 +2,8 @@
FROM golang:1.12-stretch AS build
WORKDIR /go/src/github.com/mpolden/echoip
COPY . .
ENV GO111MODULE=on
# Must build without cgo because libc is unavailable in runtime image
ENV GO111MODULE=on CGO_ENABLED=0
RUN make
# Run

View File

@ -39,5 +39,10 @@ docker-build:
docker-login:
@echo "$(DOCKER_PASSWORD)" | docker login -u "$(DOCKER_USERNAME)" --password-stdin
docker-push: docker-login
docker-test:
$(eval CONTAINER=$(shell docker run --rm --detach --publish-all $(DOCKER_IMAGE)))
$(eval DOCKER_PORT=$(shell docker port $(CONTAINER) | cut -d ":" -f 2))
curl -qfsS -m 5 localhost:$(DOCKER_PORT) > /dev/null; docker stop $(CONTAINER)
docker-push: docker-test docker-login
docker push $(DOCKER_IMAGE)