mirror of https://github.com/mpolden/echoip
Merge pull request #89 from SuperSandro2000/docker-var
Allow overriding docker command
This commit is contained in:
commit
2fe2f078e2
13
Makefile
13
Makefile
|
@ -1,3 +1,4 @@
|
||||||
|
DOCKER ?= docker
|
||||||
DOCKER_IMAGE ?= mpolden/echoip
|
DOCKER_IMAGE ?= mpolden/echoip
|
||||||
OS := $(shell uname)
|
OS := $(shell uname)
|
||||||
ifeq ($(OS),Linux)
|
ifeq ($(OS),Linux)
|
||||||
|
@ -35,18 +36,18 @@ endif
|
||||||
geoip-download: $(databases)
|
geoip-download: $(databases)
|
||||||
|
|
||||||
docker-build:
|
docker-build:
|
||||||
docker build -t $(DOCKER_IMAGE) .
|
$(DOCKER) build -t $(DOCKER_IMAGE) .
|
||||||
|
|
||||||
docker-login:
|
docker-login:
|
||||||
@echo "$(DOCKER_PASSWORD)" | docker login -u "$(DOCKER_USERNAME)" --password-stdin
|
@echo "$(DOCKER_PASSWORD)" | $(DOCKER) login -u "$(DOCKER_USERNAME)" --password-stdin
|
||||||
|
|
||||||
docker-test:
|
docker-test:
|
||||||
$(eval CONTAINER=$(shell docker run --rm --detach --publish-all $(DOCKER_IMAGE)))
|
$(eval CONTAINER=$(shell $(DOCKER) run --rm --detach --publish-all $(DOCKER_IMAGE)))
|
||||||
$(eval DOCKER_PORT=$(shell docker port $(CONTAINER) | cut -d ":" -f 2))
|
$(eval DOCKER_PORT=$(shell $(DOCKER) port $(CONTAINER) | cut -d ":" -f 2))
|
||||||
curl -fsS -m 5 localhost:$(DOCKER_PORT) > /dev/null; docker stop $(CONTAINER)
|
curl -fsS -m 5 localhost:$(DOCKER_PORT) > /dev/null; $(DOCKER) stop $(CONTAINER)
|
||||||
|
|
||||||
docker-push: docker-test docker-login
|
docker-push: docker-test docker-login
|
||||||
docker push $(DOCKER_IMAGE)
|
$(DOCKER) push $(DOCKER_IMAGE)
|
||||||
|
|
||||||
heroku-run: geoip-download
|
heroku-run: geoip-download
|
||||||
ifndef PORT
|
ifndef PORT
|
||||||
|
|
Loading…
Reference in New Issue