My dockerfile is very simple:
FROM scratch
ADD archlinux-bootstrap-2020.06.01-x86_64.tar.gz /
however, it still fails:
Sending build context to Docker daemon 166.3MB
Step 1/2 : FROM scratch
--->
Step 2/2 : ADD archlinux-bootstrap-2020.06.01-x86_64.tar.gz /
ApplyLayer exit status 1 stdout: stderr: Container ID 100011 cannot be mapped to a host ID
I've checked the archive, everything is owned just by root. I have userns set up with xx:100000:65536
. It seems to work fine for docker run, the process is run under user 100000. But the build fails and I'm not sure why.
I'm not even sure why it tries the 100011, everything in the archive is owned by 0, so it should use just 100000 (if I understand how this is supposed to work).
EDIT:
Minimal reproduction can:
:$ curl -fLo archlinux-bootstrap-2020.06.01-x86_64.tar.gz https://ftp.sh.cvut.cz/arch/iso/2020.06.01/archlinux-bootstrap-2020.06.01-x86_64.tar.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 158M 100 158M 0 0 22.0M 0 0:00:07 0:00:07 --:--:-- 22.8M
+$ echo 'FROM scratch' >Dockerfile
+$ echo 'ADD archlinux-bootstrap-2020.06.01-x86_64.tar.gz /' >>Dockerfile
+$ docker build -t xx .
Sending build context to Docker daemon 166.3MB
Step 1/2 : FROM scratch
--->
Step 2/2 : ADD archlinux-bootstrap-2020.06.01-x86_64.tar.gz /
ApplyLayer exit status 1 stdout: stderr: Container ID 100011 cannot be mapped to a host ID