Open danielgratzl opened 3 years ago
The ticket #1292 seems to be closed prematurely and should be opened again, right @tejal29? Please take a look at the new posts in that ticket and try to understand what you are missing!
It is really important to get the RUN "exec form" working, see https://docs.docker.com/engine/reference/builder/#run.
This might be a balena not a kaniko issue.
The problem is that cross-build-start
takes for some reason the wrong execution path. /usr/bin/cross-build-start
is a link to /usr/bin/resin-xbuildand running
cross-build-startshould firstly link
/bin/shto
/bin/sh.realand secondly link
/usr/bin/resin-xbuildto
/bin/sh`.
However, it wants to link the non existing path /bin/sh.real
to /bin/sh
: this should happen when resin-xbuild
is used as a shell wrapper or when cross-build-end
is called.
A workaround is to provide the missing file /bin/sh.real
. An other workaround is to build an own resin-xbuild
.
I took the code from https://github.com/balena-io-library/armv7hf-debian-qemu/blob/master/resin-xbuild.go.
sh.real
FROM balenalib/armv7hf-debian-python AS base
FROM balenalib/armv7hf-debian-python
COPY --from=base /bin/sh /bin/sh.real
RUN ["cross-build-start"]
RUN pip install --upgrade pip
RUN ["cross-build-end"]
docker run --rm -it --volume ./:/test gcr.io/kaniko-project/executor:debug --context /test --dockerfile /test/Dockerfile --no-push
resin-xbuild
FROM balenalib/armv7hf-debian-python
COPY resin-xbuild /usr/bin/resin-xbuild
RUN ["cross-build-start"]
RUN pip install --upgrade pip
RUN ["cross-build-end"]
wget https://github.com/balena-io-library/armv7hf-debian-qemu/blob/master/resin-xbuild.go
go build resin-xbuild.go
docker run --rm -it --volume ./:/test gcr.io/kaniko-project/executor:debug --context /test --dockerfile /test/Dockerfile --no-push
Actual behavior I'm using a Belena image (
balenalib/raspberrypi3-debian-python:3.6.8-build
) to build an image containing a Python3 application for rasberry.Expected behavior Build fails with the following message
The behaviour of the Balena image is explained here https://www.balena.io/blog/building-arm-containers-on-any-x86-machine-even-dockerhub/#improvingthesyntax
Additional Information
RUN [ "cross-build-start" ]
Some PiP stuff, but we don't even get here
RUN [ "cross-build-end" ]
ENTRYPOINT ["python", "application", "--production"]