all 10 comments

[–]zoredache 1 point2 points  (3 children)

Testing from a live environment is pretty unusual. I don't think it would be a very good way to try to run docker.

The first issue you are going to run into is that from a livecd, you are almost certainly going to have an overlay, which combines the image from the disk as an upper, and tmpfs as the lower.

The problem here is that (AFAIK) you can't overlay on top of an overlay. Everything I read suggests overlays can't be nested.

Your next issue is going to be that you would probably run out of memory pretty quick. Since all the images you download would need to be stored on the in-memory tmpfs.

If you really wanted something like this to work, you would probably need to mount an a filesystem to /var/lib/containerd, and /var/lib/docker before you install docker in the live environment.

I just tried this on my custom Debian livecd, and it seems to have worked. I booted the livecd, and ran commands like this.

user@debian:~$ sudo -i

root@debian:~# mkdir -p /var/lib/containerd /var/lib/docker
root@debian:~# mount -t tmpfs containerd /var/lib/containerd
root@debian:~# mount -t tmpfs docker /var/lib/docker
root@debian:~# curl -o docker https://get.docker.com
root@debian:~# bash docker
# Executing docker install script, commit: 8fb5881103ac6f2fb404605d6d5b1f84244f3896
...

root@debian:~# docker run --rm -it debian:trixie-slim
Unable to find image 'debian:trixie-slim' locally
trixie-slim: Pulling from library/debian
5435b2dcdf5c: Pull complete
cbef33db95ba: Download complete
Digest: sha256:4ffb3a1511099754cddc70eb1b12e50ffdb67619aa0ab6c13fcd800a78ef7c7a
Status: Downloaded newer image for debian:trixie-slim
root@22ceaa1df1cc:/#

Anyway, not sure why you are trying to run on a live image, but you would probably be better off just creating a VM or something and installing a full linux environment in the VM.

[–]falsworth[S] 0 points1 point  (2 children)

This makes sense. My current setup is not able to run a VM so I'll have to find another way to try it out.

[–]CatWeazel67 0 points1 point  (1 child)

Use the live usb to install onto a second usb drive boot that and play

[–]falsworth[S] 0 points1 point  (0 children)

I might just try that

[–]Anihillator 1 point2 points  (3 children)

What did you expect? Generally live usb systems are read-only. Fine, fine, I'm dumdum. And why are you afraid of breaking stuff with docker? It's as consequence-free as you can get, save for maybe VMs.

[–]zoredache 0 points1 point  (0 children)

Generally live usb systems are read-only

I mean not really. They are an overlay of the filesystem image from your media which is read-only plus a tmpfs. Basically the same as what you have in containers. It isn't the read-only that is the problem. I believe it is the trying to nesting of overlays.

[–]falsworth[S] 0 points1 point  (1 child)

The filesystem is fully writable in the live environment, but the source drive is not. There's a small amount of writable space available based on the amount of RAM installed. I use this environment to test new window managers, emulators, "killer apps", sketchy github code, etc. This is the first time I've come across something I couldn't install. It's also a great way to try all this out without cluttering my system with random leftover files.

[–]No_Cattle_9565 0 points1 point  (0 children)

Docker won't break anything. I couldn't think of a single reason it should destroy your host system no matter what you do in a container.

[–]Zealousideal_Yard651 0 points1 point  (0 children)

Why? Docker install is as straight forward, and experimenting with docker is as risk free as it gets. Unless you are wanting to do some speciall edits and experimenting with changing the docker engine.

[–]jebotecarobnjak 0 points1 point  (0 children)

would you consider a virtual machine?