From 50b52bba9570428179df8f51b2f05db731133f27 Mon Sep 17 00:00:00 2001 From: Adrian Schlatter <10478149+adrianschlatter@users.noreply.github.com> Date: Thu, 4 Jan 2024 21:21:48 +0100 Subject: [PATCH] Makefile * builds * runs * cleans up Also, version of image is defined in Makefile. --- Makefile | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..6f67bf0 --- /dev/null +++ b/Makefile @@ -0,0 +1,12 @@ +VERSION := 0.1 + +webref-$(VERSION).tar.gz: Dockerfile config/requirements.txt Makefile + docker build -t webref:$(VERSION) . + docker save webref:$(VERSION) | gzip > webref-$(VERSION).tar.gz + +up: webref-$(VERSION).tar.gz + VERSION=$(VERSION) docker compose up --detach + +clean: + VERSION=$(VERSION) docker-compose down --rmi all --volumes --remove-orphans + rm -f webref-$(VERSION).tar.gz