Builds fail in docker.
Created by: edge226
I'm trying to do some docker automation with Manjaro iso building, at first I had some issues with the chroot aspect but upon doing some research I found that running the container in --privileged mode resolves these issues.
Upon attempting to do a build again I was struck with another issue as shown below:
==> Prepare [Desktop installation] (xfce-image)
--> overlayfs mount: [/var/lib/manjaro-tools/buildiso/xfce/x86_64/xfce-image]
mount: wrong fs type, bad option, bad superblock on overlay,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so.
==> ERROR: A failure occurred in make_image_custom().
Aborting...
--> overlayfs umount: []
Okay so lets see what dmesg | tail
gives us:
[ 8612.927652] overlayfs: filesystem on '/var/lib/manjaro-tools/buildiso/xfce/x86_64/xfce-image' not supported as upperdir
I believe the issue has something to do with this function but I'm not sure how to fix it to work within the docker instance, It seems like its because upper and the resulting mount location are the same and you're thus essentially trying to mount /var/lib/manjaro-tools/buildiso/xfce/x86_64/root-image, /var/lib/manjaro-tools/buildiso/xfce/x86_64/xfce-image and /var/lib/manjaro-tools/buildiso/xfce/x86_64/work back into /var/lib/manjaro-tools/buildiso/xfce/x86_64/xfce-image.
I think this would be solved via doing something like:
mount_image(){
IMAGE_ACTIVE_MOUNTS=()
mkdir -p "${work_dir}/work"
mkdir "${work_dir}/mnt"
track_image -t overlay overlay -olowerdir="${work_dir}/root-image",upperdir="$1",workdir="${work_dir}/work" "${work_dir}/mnt"
}
This is based upon how the person does the ./entrypoint.sh script.
But then you need to change other parts of the sources to point to "${work_dir}/mnt"
but I'm not familiar enough with the code to say any more speculation.
If you want to test the docker instance run:
docker run --privileged -it --name manjaro-tools -v /etc/lsb-release:/etc/lsb-release orbos/manjaro:manjaro-tools