docker-alpine-rsync/Makefile
surtur 71f85539a1
makefile: hotfix for kaniko on cgroup v2 hosts
This is a temporary workaround that enables kaniko to run on cgroup v2
enabled hosts. Due to an upstream issue, kaniko fails to detect that it
is indeed being run from a container.
Solution introduced here is to force kaniko to run regardless.

as seen in: d728f4cd60

[skip ci]
2021-04-26 22:24:11 +02:00

28 lines
657 B
Makefile

dcmd = docker
dfile = Dockerfile
dtag = immawanderer/alpine-rsync: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 --force
.PHONY: build kaniko clean test prune
kaniko:
$(dcmd) $(dargskaniko) $(kanikoexecutorimg) $(kanikoargs)
build:
$(dcmd) $(dargs)
clean:
$(dcmd) $(cleanargs)
test: build kaniko
prune:
$(dcmd) $(pruneargs)