This repository was archived by the owner on Oct 31, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 87
This repository was archived by the owner on Oct 31, 2025. It is now read-only.
Cross build fails on Kaniko #813
Copy link
Copy link
Open
Description
Expected behaviour
Using a balenalib image with Kaniko should work as with Docker build.
Actual behaviour
Running the following kaniko executor command with the Dockerfile provided below will yield a link /bin/sh.real /bin/sh: no such file or directory error.
docker run --rm -it --volume ./:/test gcr.io/kaniko-project/executor:debug --context /test --dockerfile /test/Dockerfile --no-pushError message
INFO[0000] Retrieving image manifest balenalib/armv7hf-debian-python
INFO[0000] Retrieving image balenalib/armv7hf-debian-python from registry index.docker.io
INFO[0001] Built cross stage deps: map[]
INFO[0001] Retrieving image manifest balenalib/armv7hf-debian-python
INFO[0001] Returning cached image manifest
INFO[0001] Executing 0 build triggers
INFO[0001] Building stage 'balenalib/armv7hf-debian-python' [idx: '0', base-idx: '-1']
INFO[0001] Unpacking rootfs as cmd RUN ["cross-build-start"] requires it.
INFO[0006] RUN ["cross-build-start"]
INFO[0006] Initializing snapshotter ...
INFO[0006] Taking snapshot of full filesystem...
INFO[0010] Cmd: /usr/bin/cross-build-start
INFO[0010] Args: []
INFO[0010] Running: [/usr/bin/cross-build-start]
2023/03/20 09:31:22 link /bin/sh.real /bin/sh: no such file or directory
error building image: error building stage: failed to execute command: waiting for process to exit: exit status 1
Additional information
Dockerfile
FROM balenalib/armv7hf-debian-python
RUN ["cross-build-start"]
RUN pip install --upgrade pip
RUN ["cross-build-end"]Docker build
This will work as expected:
docker build .Kaniko executor
This will fail:
docker run --rm -it --volume ./:/test gcr.io/kaniko-project/executor:debug --context /test --dockerfile /test/Dockerfile --no-pushWorkaround
I documented a workaround at kaniko #1556: I replaced resin-xbuild by a custom build of https://github.com/balena-io-library/armv7hf-debian-qemu/blob/master/resin-xbuild.go.
Metadata
Metadata
Assignees
Labels
No labels