Balena Docker images, problem with using RUN command in substantial layers (resolved)

I have a quick question with regard to using your “balenalib/jetson-xavier-ubuntu:xenial-20200604” as a base layer.

Since sometimes last year we started to have this problem with your latest images that whenever we try RUN command in our Dockerfile, we get the following error, regardless of an action:
standard_init_linux.go:211: exec user process caused “permission denied”
We have ignored the error by using an older image, such as following:

But now we prefer to use your latest docker image on our new hardware.
I generally think there is a problem with the entry_point to our next layer.
Below is the current example that I have:
layer_0 Dockerfile:

#   |-jetson-xavier-ubuntu-xenial
# this is our copy of balena's jetson xavier Xenial image
# TODO: rem``ove once specific package versions are added
ARG version=0.0
ARG version=0.0.0
FROM balenalib/jetson-xavier-ubuntu:xenial-20200604

CMD ["bash"] 

layer_1 Dockerfile:

# Base
#  |-custom-base-jetson-xavier-xenial
ARG version=0.0.0
ARG base_version=0.0.0
FROM repo/jetson-xavier-ubuntu-xenial:${base_version}

# need this to build aarch64 target from amd64 host
COPY qemu-aarch64-static /usr/bin/

# set noninteractive for apt-get installs
RUN echo "debconf debconf/frontend select Noninteractive" | debconf-set-selections

# Install essential packages
RUN apt-get update && apt-get install -y --allow-unauthenticated --no-install-recommends \
	apt-utils=1.2.32ubuntu0.1 \
	build-essential=12.1ubuntu2 \
	bzip2=1.0.6-8ubuntu0.2 \
	curl=7.47.0-1ubuntu2.15 \
	git=1:2.7.4-0ubuntu1.9 \
	htop=2.0.1-1ubuntu1 \
	iproute2=4.3.0-1ubuntu3.16.04.5 \
	iputils-ping=3:20121221-5ubuntu2 \
	iw=3.17-1 \
	nano=2.5.3-2ubuntu2 \
	net-tools=1.60-26ubuntu1 \
	openssh-server=1:7.2p2-4ubuntu2.10 \
	python-pip=8.1.1-2ubuntu0.4 \
	python-setuptools=20.7.0-1 \
	tmux=2.1-3build1 \
	unzip=6.0-20ubuntu1 \
	usbutils=1:007-4 \
	screen=4.3.1-2build1 \
	wget=1.17.1-1ubuntu1.5 \
	wireless-tools=30~pre9-8ubuntu1 \
	&& apt-get clean && \
	rm -rf /var/cache/apt && \
	rm -rf /var/lib/apt/lists/*
RUN pip install six==1.12.0 wheel==0.33.4
CMD ["bash"]

Any RUN command generates the error mentioned above.
Now please note that if we remove the RUN commands from layer_1 and put them in layer_0 it will work. Also if we use balenalib/jetson-tx2-ubuntu:xenial-20190612 in our layer_0, the RUN commands in layer_1 will work no problem.

Thank you for your time and support.

The problem is fixed.
The “qemu-aarch64-static” on the host device did not have the write executable permission. When I gave executing permission on that file to all users and then COPY it through the Dockerfile everything worked.
Thank you.
P.S: we should use install_package instead of apt program :slight_smile:


It’s good to know that you fixed the issue yourself. Please let us know if you need further support.