Change docker commands to $(ENGINE)

Change docker commands to $(ENGINE) to use podman when needed

Change-Id: I9441c8e8c0a729fd48602c4f4f27431324874e81
This commit is contained in:
frenzyfriday 2022-05-11 11:05:15 +02:00
parent 93eb02abe8
commit 0b5fa1d88d
1 changed files with 5 additions and 5 deletions

View File

@ -42,11 +42,11 @@ ifndef GERRIT_USER
endif
.PHONY: build
build: data/id_rsa check-env ## Build image using docker
build: data/id_rsa check-env ## Build image using $(ENGINE)
@echo "Checking that current user can connect to gerit using ssh..."""
@python3 ./tools/ssh-check.py
$(ENGINE) build -t $(IMAGE_TAG) .
@echo "Image size: $$(docker image inspect --format='scale=0; {{.Size}}/1024/1024' $(IMAGE_TAG) | bc)MB"
@echo "Image size: $$($(ENGINE) image inspect --format='scale=0; {{.Size}}/1024/1024' $(IMAGE_TAG) | bc)MB"
@echo "Validate that built container can also connect to gerrit..."""
$(ENGINE) run --env GERRIT_USER -it $(IMAGE_TAG) python3 /root/ssh-check.py
@ -57,9 +57,9 @@ up: data/id_rsa check-env ## Run containers
@# $(ENGINE) run --env GERRIT_USER -it $(IMAGE_TAG) python3 /root/ssh-check.py
@# --abort-on-container-exit
docker-compose up --force-recreate --remove-orphans --abort-on-container-exit <<<y
@# docker container stop elastic-recheck
@# bash -c "docker rm elastic-recheck || true"
@# docker run --env ES_URL --env LS_URL --env DB_URI --env GERRIT_HOST --env GERRIT_USER --env IRC_NICK --env IRC_PASS -it --name elastic-recheck elastic-recheck:latest
@# $(ENGINE) container stop elastic-recheck
@# bash -c "$(ENGINE) rm elastic-recheck || true"
@# $(ENGINE) run --env ES_URL --env LS_URL --env DB_URI --env GERRIT_HOST --env GERRIT_USER --env IRC_NICK --env IRC_PASS -it --name elastic-recheck elastic-recheck:latest
.PHONY: down
down: ## Destroy containers