2020-12-02 02:38:02 +01:00
|
|
|
dcmd = docker
|
|
|
|
dfile = Dockerfile
|
|
|
|
dtag = immawanderer/fedora-hugo:testbuild
|
2020-12-29 01:56:39 +01:00
|
|
|
dargs = build -t $(dtag) --no-cache --pull - < $(dfile)
|
2020-12-02 02:38:02 +01:00
|
|
|
cleanargs = image rm -f $(dtag)
|
2020-12-02 03:45:36 +01:00
|
|
|
pruneargs = system prune -af
|
2020-12-02 02:38:02 +01:00
|
|
|
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
|
|
|
|
|
2020-12-29 01:59:37 +01:00
|
|
|
.PHONY: build kaniko clean test prune
|
2020-12-02 02:38:02 +01:00
|
|
|
|
|
|
|
kaniko:
|
|
|
|
$(dcmd) $(dargskaniko) $(kanikoexecutorimg) $(kanikoargs)
|
|
|
|
|
|
|
|
build:
|
|
|
|
$(dcmd) $(dargs)
|
|
|
|
|
|
|
|
clean:
|
|
|
|
$(dcmd) $(cleanargs)
|
|
|
|
|
2020-12-29 01:59:37 +01:00
|
|
|
test: build kaniko
|
|
|
|
|
2020-12-02 02:38:02 +01:00
|
|
|
prune:
|
|
|
|
$(dcmd) $(pruneargs)
|