From e6ec85fc19f6409d01236db65707c54379ce3b0d Mon Sep 17 00:00:00 2001 From: surtur Date: Fri, 20 Aug 2021 13:02:28 +0200 Subject: [PATCH 1/2] dockerfile: upgrade to a cgroupv2-aware kaniko --- docker/docker/Dockerfile.linux.amd64 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/docker/Dockerfile.linux.amd64 b/docker/docker/Dockerfile.linux.amd64 index 9007995..70a77f7 100644 --- a/docker/docker/Dockerfile.linux.amd64 +++ b/docker/docker/Dockerfile.linux.amd64 @@ -1,4 +1,4 @@ -FROM gcr.io/kaniko-project/executor:v1.6.0-debug +FROM gcr.io/kaniko-project/executor@sha256:6ecc43ae139ad8cfa11604b592aaedddcabff8cef469eda303f1fb5afe5e3034 ADD release/linux/amd64/kaniko-docker /kaniko/ ENTRYPOINT ["/kaniko/kaniko-docker"] -- 2.48.1 From 0452916780c64a21ea05eed31ff6daf3c94a94de Mon Sep 17 00:00:00 2001 From: surtur Date: Fri, 20 Aug 2021 13:12:14 +0200 Subject: [PATCH 2/2] remove the force arg --- kaniko.go | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/kaniko.go b/kaniko.go index ce0e125..18c3554 100644 --- a/kaniko.go +++ b/kaniko.go @@ -114,17 +114,6 @@ func (p Plugin) Exec() error { cmdArgs = append(cmdArgs, fmt.Sprintf("--no-push")) } } - // due to kaniko spontaneously failing to detect it's being run in a container - // it's probably for the better to always force-run here until this is resolved - // and fixed upstream. Since all of our runners are on cgroup v2 hosts, this - // issue is quite impactful for us. - // ref: https://github.com/GoogleContainerTools/kaniko/issues/1592 - // - // example error message: '/kaniko/executor --dockerfile=Dockerfile --context=dir://. - // --no-push kaniko should only be run inside of a container, run with the --force - // flag if you are sure you want to continue' - // another ref: https://drone.dotya.ml/wanderer/docker-archlinux-cdev/5960/2/2 - cmdArgs = append(cmdArgs, fmt.Sprintf("--force")) cmd := exec.Command("/kaniko/executor", cmdArgs...) cmd.Stdout = os.Stdout -- 2.48.1