IMAGE_NAME="alp-mdb" build: clean Dockerfile @echo -n "> Building image..............."; docker build --force-rm -t $(IMAGE_NAME) . && echo "done" || echo "error"; Dockerfile: docker/main docker/include/* @echo -n "> Building file Dockerfile....."; @cpp -o Dockerfile docker/main && echo "done" || echo "error"; clean: @echo -n "> Stopping containers.........."; @docker stop inst1; @docker rm -flv inst1; @echo -n "> Deleting docker image........"; @docker rmi -f $(IMAGE_NAME) && echo "done" || echo "failed"; @echo -n "> Deleting Dockerfile.........."; @rm Dockerfile && echo "done" || echo "failed"; boot: @while true; do \ echo "*** 1. Updating virtual environment"; \ git pull origin stable; \ echo "*** 2. Building image"; \ make build; \ echo "*** 3. Launching container"; \ docker run --name inst1 $(IMAGE_NAME); \ echo "*** 4. Deleting container"; \ docker stop inst1; \ docker rm -flv inst1; \ sleep 2; \ done; kill: @docker exec -ti inst1 sh -c 'rm boot.lock';