Skip to content

Commit 742e70a

Browse files
committed
ci/cd: add docker recipes in Makefile
1 parent 2fb01e1 commit 742e70a

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

Makefile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,27 @@ endif
4242
run: ## Run project
4343
pdm run python -m gale_shapley $(number_of_simulations)
4444

45+
docker-build: ## Build Docker image for the project
46+
docker build -t gale-shapley .
47+
48+
docker-run: ## Run Docker container for the project
49+
docker run --rm -it \
50+
-v $(PWD)/config/example_config_custom_input.yaml:/usr/src/app/config/config.yaml \
51+
-v $(PWD)/logs:/usr/src/app/logs \
52+
-e number_of_simulations=$(number_of_simulations) \
53+
gale-shapley
54+
55+
docker: docker-build docker-run ## Build and run project in Docker
56+
57+
docker-logs: ## Show Docker container logs
58+
docker logs -f $(shell docker ps -q)
59+
60+
docker-stop: ## Stop Docker container
61+
docker stop $(shell docker ps -q)
62+
63+
docker-kill: ## Kill Docker container
64+
docker kill $(shell docker ps -q)
65+
4566
project-help: ## Show project help
4667
pdm run python -m gale_shapley --help
4768

0 commit comments

Comments
 (0)