Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpolden/echoip.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSandro Jäckel <sandro.jaeckel@gmail.com>2020-04-08 06:06:14 +0300
committerSandro Jäckel <sandro.jaeckel@gmail.com>2020-04-08 06:06:14 +0300
commit5fcd1740e7811e86acc4f4dbdb8277e759fc4214 (patch)
tree0dd0489d5e74e2ef5353f0a380b5411580c2492a
parent2b0842de3f6f626b896f9e4f98bf001d5d31f03c (diff)
Allow overriding docker command
with eg. sudo docker or podman
-rw-r--r--Makefile13
1 files changed, 7 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 3a35993..d1e3518 100644
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,4 @@
+DOCKER ?= docker
DOCKER_IMAGE ?= mpolden/echoip
OS := $(shell uname)
ifeq ($(OS),Linux)
@@ -35,18 +36,18 @@ endif
geoip-download: $(databases)
docker-build:
- docker build -t $(DOCKER_IMAGE) .
+ $(DOCKER) build -t $(DOCKER_IMAGE) .
docker-login:
- @echo "$(DOCKER_PASSWORD)" | docker login -u "$(DOCKER_USERNAME)" --password-stdin
+ @echo "$(DOCKER_PASSWORD)" | $(DOCKER) login -u "$(DOCKER_USERNAME)" --password-stdin
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 -fsS -m 5 localhost:$(DOCKER_PORT) > /dev/null; docker stop $(CONTAINER)
+ $(eval CONTAINER=$(shell $(DOCKER) run --rm --detach --publish-all $(DOCKER_IMAGE)))
+ $(eval DOCKER_PORT=$(shell $(DOCKER) port $(CONTAINER) | cut -d ":" -f 2))
+ curl -fsS -m 5 localhost:$(DOCKER_PORT) > /dev/null; $(DOCKER) stop $(CONTAINER)
docker-push: docker-test docker-login
- docker push $(DOCKER_IMAGE)
+ $(DOCKER) push $(DOCKER_IMAGE)
heroku-run: geoip-download
ifndef PORT