From 2d76006c467a093e8f025cda0d51d9058d3c49df Mon Sep 17 00:00:00 2001 From: surtur Date: Wed, 20 Jan 2021 09:57:18 +0100 Subject: [PATCH] feat: add Makefile --- Makefile | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..3616d71 --- /dev/null +++ b/Makefile @@ -0,0 +1,27 @@ +dcmd = docker +dfile = Dockerfile +dtag = immawanderer/alpine-rf:testbuild +dargs = build -t $(dtag) --no-cache --pull - < $(dfile) +cleanargs = image rm -f $(dtag) +pruneargs = system prune -af +dargskaniko = run --rm -it -w=$(kanikowdir) -v $$PWD:$(kanikowdir) +kanikoexecutorimg = gcr.io/kaniko-project/executor +kanikowdir = /src +kanikocontext = . +kanikoargs = -f=$(dfile) -c=$(kanikocontext) --use-new-run --snapshotMode=redo --no-push + +.PHONY: build kaniko clean test prune + +kaniko: + $(dcmd) $(dargskaniko) $(kanikoexecutorimg) $(kanikoargs) + +build: + $(dcmd) $(dargs) + +clean: + $(dcmd) $(cleanargs) + +test: build kaniko + +prune: + $(dcmd) $(pruneargs)