From 1e04ef8aa544ee895da14aac02b68dc8f79c2da2 Mon Sep 17 00:00:00 2001 From: Ethan Paul Date: Tue, 18 Jun 2024 21:47:45 -0400 Subject: [PATCH] Add container build automation makefile --- Makefile | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..32c6ea8 --- /dev/null +++ b/Makefile @@ -0,0 +1,16 @@ +REPOSITORY = vcs.enp.one/skylab/wireguard-proxy + + +.PHONY: help docs +# source: https://marmelab.com/blog/2016/02/29/auto-documented-makefile.html +help: ## List Makefile targets + $(info Makefile documentation) + @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-10s\033[0m %s\n", $$1, $$2}' + + +image: ## Build image + podman build . --tag $(REPOSITORY):latest + +push: image ## Build and publish image + podman login $(shell echo $(REPOSITORY) | cut -d '/' -f 1) + podman push $(REPOSITORY):latest