Skip to content

Commit

Permalink
allow overriding docker command for podman (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
peterhoeg committed May 21, 2023
1 parent cad6097 commit d482d5d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
IMAGE_NAME = melpazoid
DOCKER ?= docker
DOCKER_OPTIONS = --cap-drop all --security-opt=no-new-privileges --pids-limit=5

.PHONY: run
Expand All @@ -8,15 +9,15 @@ run:
# https://cheatsheetseries.owasp.org/cheatsheets/Docker_Security_Cheat_Sheet.html
.PHONY: test
test: image
@docker run --rm --network=none ${DOCKER_OPTIONS} ${IMAGE_NAME}
@$(DOCKER) run --rm --network=none ${DOCKER_OPTIONS} ${IMAGE_NAME}

.PHONY: term
term: image
docker run -it --rm --entrypoint=/bin/bash ${DOCKER_OPTIONS} ${IMAGE_NAME}
$(DOCKER) run -it --rm --entrypoint=/bin/bash ${DOCKER_OPTIONS} ${IMAGE_NAME}

.PHONY: image
image:
@docker build --build-arg PACKAGE_MAIN --progress=plain --quiet \
@$(DOCKER) build --build-arg PACKAGE_MAIN --progress=plain --quiet \
--tag ${IMAGE_NAME} -f docker/Dockerfile .

.PHONY: test-melpazoid
Expand Down

0 comments on commit d482d5d

Please sign in to comment.