melpazoid/Makefile

27 lines
695 B
Makefile
Raw Normal View History

2020-02-23 22:27:24 -08:00
IMAGE_NAME = melpazoid
DOCKER_OPTIONS = --cap-drop all --security-opt=no-new-privileges --pids-limit=5
2020-02-22 11:06:20 -08:00
.PHONY: run
run:
python3 melpazoid/melpazoid.py
2020-02-22 15:16:32 -08:00
# https://cheatsheetseries.owasp.org/cheatsheets/Docker_Security_Cheat_Sheet.html
2020-03-02 18:08:56 +09:00
.PHONY: test
2020-02-22 11:06:20 -08:00
test: image
@docker run --rm --network=none ${DOCKER_OPTIONS} ${IMAGE_NAME}
2020-02-22 11:06:20 -08:00
.PHONY: term
term: image
docker run -it --rm --entrypoint=/bin/bash ${DOCKER_OPTIONS} ${IMAGE_NAME}
2020-02-22 11:06:20 -08:00
.PHONY: image
image:
@docker build --build-arg PACKAGE_MAIN --quiet \
2020-03-01 13:33:23 -08:00
--tag ${IMAGE_NAME} -f docker/Dockerfile .
.PHONY: test-melpazoid
test-melpazoid:
mypy --non-interactive --install-types melpazoid
2021-08-27 22:41:02 -07:00
pytest --doctest-modules --durations=5
black -S --check .