feat: upgrade to a cgroupv2-aware kaniko (#1)
All checks were successful
continuous-integration/drone/push Build is passing

since commit b22e993224, kaniko is cgroupv2-aware.

hotfix of a34e88943a is therefore no longer needed.

Reviewed-on: #1
Co-authored-by: wanderer <wanderer@noreply.git.dotya.ml>
Co-committed-by: wanderer <wanderer@noreply.git.dotya.ml>
This commit is contained in:
wanderer 2021-08-20 13:14:31 +02:00
parent 7eb35192c4
commit 95412ee324
Signed by: Gitea
GPG Key ID: 0DD13DBC6B5433D3
2 changed files with 1 additions and 12 deletions

@ -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"]

@ -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