You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a way to bind mount the chroot directory onto / ?
I need to get docker pull working in the chroot, and in order for docker pull to work properly I need to bind mount the chroot directory onto the chroot /
Ie. mount -o bind chroot-ubuntu chroot-ubuntu/
Here's the full working chroot example:
mkdir chroot-ubuntu
debootstrap --variant=buildd jammy chroot-ubuntu
mount -o bind chroot-ubuntu chroot-ubuntu/
mount --rbind /sys chroot-ubuntu/sys
mount --rbind /dev chroot-ubuntu/dev
mount -t proc /proc chroot-ubuntu/proc
chroot chroot-ubuntu /bin/bash
apt update
apt install -y iptables curl
curl -fsSL https://get.docker.com | sh
/usr/bin/dockerd --iptables=False &
sleep 2
docker pull alpine
Here is the thread where the chroot bind mount was suggested to fix the docker pull issue. moby/moby#34817
The text was updated successfully, but these errors were encountered:
If figured out a workaround for this.
Instead of starting docker in the chroot env, build as normal, and then load the image as a second disk on an Ubuntu VM.
Install docker on the VM and change the base dir to the rasp pi image docker dir. Then restart docker and do the docker pull. It will setup the docker image on the rasp pi image. Do a sync and unmount before killing the VM.
Uh oh!
There was an error while loading. Please reload this page.
Hi,
Is there a way to bind mount the chroot directory onto / ?
I need to get docker pull working in the chroot, and in order for docker pull to work properly I need to bind mount the chroot directory onto the chroot /
Ie.
mount -o bind chroot-ubuntu chroot-ubuntu/
Here's the full working chroot example:
Here is the thread where the chroot bind mount was suggested to fix the docker pull issue.
moby/moby#34817
The text was updated successfully, but these errors were encountered: