In the previous post, I have shared my first experience with the Debian images builder – debos. I have posted my current results on the issue but since there was no response, I’ve decided to try to move forward by myself.

Just to remind – I was stuck at the following error (when building for arm64):

Potential solution

After some research, it seemed like the binfmt_misc support might be missing in my setup. Links with similar issues which were useful:

At first, it seemed to be necessary to install binfmt-support into the docker image. It is necessary to note, that binfmt_misc module on the host must be loaded (which is not always the case). With those modifications in place, my debos build inside docker container failed at:

To overcome this /proc access issue I have decided to run the container in the privileged mode. Generally, I try to avoid doing that whenever not strictly required. Scoping the actual access requirements and reducing the container access to the host system might be another task to look at. For now, I’m sticking with the privileged mode enabled without much deeper analysis.

One more issue

One more issue to solve was:

It appears that there is a debootstrap bug report hanging in the Debian bug tracker since the Dec 2015. The issue was resolved in the debootstrap 1.0.96. Unfortunately, the debootstrap version shipped in my Debian Stretch container is 1.0.89. As a quick solution, I decided to provide the patch manually:

A much cleaner solution would be to install debootstrap from stretch-backports, which bumps the version to 1.0.100:

First success

Finally, the debos build for arm64 inside the docker container finishes successfully:

I have not (yet) run the image on the real hardware, but it is certainly one of the things I would like to do next.

My Dockerfile, scripts and some README can be found in the 3mdeb github debos fork.


After some struggle, I finally was able to build the image inside the docker container. I consider it quite useful as it may enable more users (who do not own the native Debian machine) to take advantage of the debos utility. Hopefully, I can manage to push this idea upstream and some more people will take advantage of my work.