containers-from-scratch icon indicating copy to clipboard operation
containers-from-scratch copied to clipboard

root filesystem and chroot example not working

Open saikovvuri opened this issue 4 years ago • 2 comments

Hello Liz, Fantastic session . howeever when i am trying to following the instructions for setting rootfs using chroot, not able to make it work

root@simpleLinuxVM:/# go run main.go run /bin/bash Running [/bin/bash] Running [/bin/bash] panic: fork/exec /bin/bash: no such file or directory

Appreciate your advice.

saikovvuri avatar Apr 07 '20 17:04 saikovvuri

Hi thanks for your talks !

I've got the same problem, even though, I tried the same code of multiple of your differents talks on "building container from scratch". Finally I tried the code of your repo and I still have this issue :

panic: fork/exec /bin/bash: no such file or directory

My filesystem that I use as a folder is supposed to work, I tried the bash binary which is in it and it works from the host. (For information I took this from this repo : https://github.com/mugli/container-from-scratch-in-go)

Thank you in advance for the help

vincentchemouny avatar Nov 13 '20 01:11 vincentchemouny

@saikovvuri @vincentchemouny

docker run -d --rm --name ubuntufs ubuntu:20.04 sleep 1000
docker export ubuntufs -o ubuntufs.tar
docker stop ubuntufs
mkdir -p /home/liz/ubuntufs
tar xf ubuntufs.tar -C /home/liz/ubuntufs/

cxsu avatar Jan 14 '21 04:01 cxsu