kaniko: error building image: error building stage GCC
I try build gcc image with kaniko and get error
INFO[0003] Unpacking rootfs as cmd RUN cmake -DCMAKE_BUILD_TYPE=Release requires it.
error building image: error building stage: removing whiteout usr/bin/cmake/.wh..wh..opq: lstat /usr/bin/cmake/.wh..opq: operation not permitted
kaniko image : gcr.io/kaniko-project/executor:debug
stack:
k8s, gitlab, gitlab-runner(into k8s)
About this issue
- Original URL
- State: open
- Created 5 years ago
- Reactions: 1
- Comments: 32 (4 by maintainers)
Commits related to this issue
- Attempting to work around build error > Step #1: error building image: error building stage: failed to execute command: extracting fs from image: removing whiteout .wh.workspace: unlinkat //workspace... — committed to wallrj/etcd-cluster-operator by wallrj 4 years ago
- Try to work around https://github.com/GoogleContainerTools/kaniko/issues/763 — committed to gino-m/ground-platform by gino-m 4 years ago
With kaniko 0.24.0 this problem still persists.
First run without cache is successful, but on the second run, with the cached layer, it fails:
Is there a workaround?
I’ve changed the docker storage driver from the default
aufstooverlay2as mentioned in this comment.As a note if you use a gitlab-runner with docker executor: I needed to change it within
/etc/docker/daemon.jsonfor the whole docker process. The configuration in/etc/gitlab-runner/config.tomlusingenvironment= ["DOCKER_DRIVER=overlay2"]or within the CI was not sufficient (as suggested in the gitlab documentation)This has fixed my issues I faced currently.
I’ve experienced the same issue while using warmer. It occurs when the executor is creating a .tag.gz file when running under Docker.
error building image: error building stage: failed to execute command: extracting fs from image: unexpected EOFEdit: I’m using the latest debug image.
We are also on gitlab/gitlab-runner + k8s.
I can reproduce this ~sometimes~ always (if cache is present) with this simple Dockerfile:
with this command:
inside the image “gcr.io/kaniko-project/executor:debug” (sha256:025bd79d3e0699b5f59142b03f7e66916980bd0e32653b9c7e21b561d4e538c3) and also “gcr.io/kaniko-project/executor:debug-v0.16.0”
When the cache is cleared, the build works fine.