Re: lightweight virtualization

Liste des GroupesRevenir à cs raspberry-pi 
Sujet : Re: lightweight virtualization
De : invalid (at) *nospam* invalid.invalid (Richard Kettlewell)
Groupes : comp.sys.raspberry-pi
Date : 07. Sep 2025, 09:58:40
Autres entêtes
Organisation : terraraq NNTP server
Message-ID : <wwvldmqmyf3.fsf@LkoBDZeT.terraraq.uk>
References : 1 2 3
User-Agent : Gnus/5.13 (Gnus v5.13)
Theo <theom+news@chiark.greenend.org.uk> writes:
Richard Kettlewell <invalid@invalid.invalid> wrote:
Jimmy Logan <punk.book8853@fastmail.com> writes:
I'd like to create some kind of service container on rpi4b which I have,
which would allow me to just install something in a normal way (not
programming the whole installation process like dockerfiles), without
changing anything on the current OS.
 
You don’t need any Dockerfiles to use Docker. So, perhaps Docker will
meet your needs.
>
Isn't the problem that Docker isn't persistent? Next time the
container is started it loses the state from the previous time - so
any changes you make, starting with installing any packages and then
on, have to be done again?

Docker containers are persistent. If you stop a container then when you
restart it, it will have the same contents it did before.

richard@embelyon:~ $ docker container exec -it example bash
root@0c09f6c2a5e5:/# ls /persistent
ls: cannot access '/persistent': No such file or directory
root@0c09f6c2a5e5:/# touch /persistent
root@0c09f6c2a5e5:/#
exit

richard@embelyon:~ $ docker container stop example
example

richard@embelyon:~ $ docker container exec -it example bash
Error response from daemon: container
0c09f6c2a5e59eaafb9943ff4ec8352379fca3484980dda936636e290f4f3c2f is not running

richard@embelyon:~ $ docker container start example
example

richard@embelyon:~ $ docker container exec -it example bash
root@0c09f6c2a5e5:/# ls -l /persistent
-rw-r--r-- 1 root root 0 Sep  7 08:51 /persistent


If you remove the container and create a new from the same image, then
you lose any changes. But the same is true if you destroy a VM or wipe
and reinstall a physical computer.

--
https://www.greenend.org.uk/rjk/

Date Sujet#  Auteur
10 Mar 26 o 

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal