When the user restarts an already existing kas container, errors are
thrown because of existing folders or users. One example is the usage
of gitlab-ci runners.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
When we run as root on the host and want to allow the builder to do the
same, e.g. to access root-owned volumes, accept USER_ID=0 to express
this.
This allows to tell the user to call "docker run -e USER_ID=$(id -u)",
and it will always reflect the calling context's permissions into the
container.
Reported-by: Jan Christian Grünhage <jan.christian@gruenhage.xyz>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
There is a nasty problem with legacy aufs: wic tries to find out the
block size of the filesystem that holds the partition images, but aufs
does not seem to implement this properly, returning 0 at least on Debian
Jessie. That makes wic become upset and through a division-by-zero
exception soon after.
Catch this case by warning the user about the inappropriate docker
setup during container start.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Cosmetic cleanup: call the user and its home dir "builder" as it is an
active entity. This will leave yocto build results under
/builder/build/tmp/deploy/...
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>