Talk:Docker

From Gentoo Wiki
Jump to:navigation Jump to:search
Note
This is a Talk page - please see the documentation about using talk pages. Add newer comments below older ones, sign comments using four tildes (~~~~), and indent successive comments with colons (:). Add new sections at the bottom of the page, under a heading (== ==). Please remember to mark sections as "open for discussion" using {{talk|open}}, so they will show up in the list of open discussions.

Gentoo in Docker Container

Talk status
This discussion is still ongoing as of August 18, 2017.

I believe adding a short section on running Gentoo in Docker may be beneficial to many users. This little excerpt is taken from the official docker images repo on github.

user $docker create -v /usr/portage --name myportagesnapshot gentoo/portage:latest /bin/true
user $docker run --volumes-from myportagesnapshot gentoo/stage3-amd64:latest /bin/bash

https://github.com/gentoo/gentoo-docker-images

--Rage (talk) 12:22, 18 August 2017 (UTC)

Details for Administration of Docker Containers hosted on Gentoo

Please add notes on:

Location of Docker containers in Gentoo file tree

This is not mentioned and obscure to find.

Docker images can rapidly grow large. So this is vital to know for users with limited file space to know where to add additional storage.

Elacheche (talk) 21:34, 30 May 2020 (UTC) Are you talking about this:

user $docker system info | awk '/Root Dir/'
 Docker Root Dir: /var/lib/docker
user $sudo ls -al /var/lib/docker/
total 96
drwx--x--x  16 root root  4096 May 23 23:01 .
drwxr-xr-x  24 root root  4096 May 14 12:04 ..
drwx------   2 root root  4096 Dec 26  2018 builder
drwx------   4 root root  4096 Dec 26  2018 buildkit
drwx------   3 root root  4096 Dec 20  2018 containerd
drwx------  14 root root 12288 May 26 15:10 containers
drwx------   5 root root  4096 Dec 26  2018 devicemapper
drwx------   4 root root  4096 Feb 14  2019 image
drwxr-x---   3 root root  4096 Dec 20  2018 network
drwx------ 108 root root 24576 May 26 15:10 overlay2
drwx------   4 root root  4096 Dec 20  2018 plugins
drwx------   2 root root  4096 May 23 23:01 runtimes
drwx------   2 root root  4096 Dec 26  2018 swarm
drwx------   2 root root  4096 May 26 14:38 tmp
drwx------   2 root root  4096 Dec 20  2018 trust
drwx------   5 root root  4096 May  9 16:04 volumes
user $sudo ls -al /var/lib/docker/{image,containers,volumes}
/var/lib/docker/containers:
total 64
drwx------ 14 root root 12288 May 26 15:10 .
drwx--x--x 16 root root  4096 May 23 23:01 ..
drwx------  4 root root  4096 May 23 23:01 24527b343381d679804bd953bcdc885c9474bc5148de289f3d25006a1464c5f9
drwx------  4 root root  4096 May 23 23:01 25e8207938e8b46bd225a511746dafb64688c5f3cd3de5b6503df261eb813e9b
drwx------  4 root root  4096 May 26 12:01 39e6856c5d6a4983c2ae3d8e34a77e4dd31d8fda2eba2f51b57f0ca7970071e3
drwx------  4 root root  4096 May 23 23:01 51c4cdabe0f415ea17eec2e93f255ad2dae849f456f4b3b10d21dd83d12539b4
drwx------  4 root root  4096 Jan  3  2019 5d88cc304f43502365a12a22f6d83c21814b3088e61f5b18ce73b1e015ef5869
drwx------  4 root root  4096 May 26 14:38 67a04e24cc7be6ce6e9cbf1c74145fb281a8444e05688a7ee9eba78d853529e1
drwx------  4 root root  4096 Jan  3  2019 83507c120b90e735efefb39ac721fa41b423ced9a08ced51ed99867664ca7160
drwx------  4 root root  4096 May 23 23:01 8a64e30b89baa473e2e62721bc54d1205a0266a0965bda278264b0b47e89501d
drwx------  4 root root  4096 May 24 09:47 ada2c8bc5e11e2a645dcc200b532a1d643122d02ade280f77c61ed982b1e43d3
drwx------  4 root root  4096 May 26 12:14 c9f368e6f6a57471eb084e0c46d14b8990b8475d97d1e9804a852e0d747606cb
drwx------  4 root root  4096 May 24 09:45 e1391816215e396b5fb4ed315f5141352897fa97f8e301ddbff7effd9280fcc8
drwx------  4 root root  4096 May 23 23:06 e593400c16c456742dbcad1b60d264c1fc183b8e0abfbf65689429e16d43465a

/var/lib/docker/image:
total 16
drwx------  4 root root 4096 Feb 14  2019 .
drwx--x--x 16 root root 4096 May 23 23:01 ..
drwx------  5 root root 4096 Dec 26  2018 devicemapper
drwx------  5 root root 4096 May 26 14:38 overlay2

/var/lib/docker/volumes:
total 76
drwx------  5 root root  4096 May  9 16:04 .
drwx--x--x 16 root root  4096 May 23 23:01 ..
drwxr-xr-x  3 root root  4096 May  9 15:38 1f11fb3d36b5dc124f412966540bc5024d4d44d7755c82bf66fa137a39553872
drwxr-xr-x  3 root root  4096 May  9 16:04 2e8a438fb99fae47620974a516261706a724b39117aa8632d84b8af6dc2ba9ce
drwxr-xr-x  3 root root  4096 May  9 04:36 b73777aa8d2cb2bbec776fe2efc16e34722bf2cf0cceb3f530b1f996568dcb1b
-rw-------  1 root root 65536 May 23 23:01 metadata.db
user $docker volume ls
DRIVER              VOLUME NAME
local               1f11fb3d36b5dc124f412966540bc5024d4d44d7755c82bf66fa137a39553872
local               2e8a438fb99fae47620974a516261706a724b39117aa8632d84b8af6dc2ba9ce
local               b73777aa8d2cb2bbec776fe2efc16e34722bf2cf0cceb3f530b1f996568dcb1b

How to move Docker containers into and out of Gentoo file tree

How can a Docker container built in Gentoo be moved to another machine that hosts a Docker server?

How can a Docker container be moved from a different machine into a local Gentoo file tree, and started up successfully?

ps, thanks for the terrific notes on getting Docker up and running in Gentoo!

Russelld (talk) 06:39, 30 May 2020 (UTC)


Elacheche (talk) 21:41, 30 May 2020 (UTC)

@Russelld: Can you please elaborate? I think you're confusing between containers and images.. Containers are stateless process or an image, you can create an image locally using a Docker file and then upload it to a public or private registry, like Docker HUB, or you can generate a tarball from that Docker file then move it to whatever you like, then use it on that docker server.

Configuring the kernel for Docker

Talk status
This discussion is still ongoing.

CFQ has been removed from Kernel 5.0. Mimosinnet (talk) 04:39, 1 May 2021 (UTC)


Docker Moved?

Talk status
This discussion is still ongoing.

Docker is now at app-containers/docker instead of app-emulation/docker I'm very new here, should I just edit instances of it to show the new one or? ThellraAK (talk) 08:39, 25 December 2021 (UTC)

I submitted an edit reflecting the move, I believe that the changes made are correct, however I could not check everything on the page, especially the Troubleshooting section, and would be grateful if a second pair of eyes could check that it is, in fact, correct.
-- Husky (talk) 23:18, 09 January 2022 (UTC)

Registry service?

Talk status
This discussion is still ongoing.

I think the article should explain what "registry" is or why it is needed. Docker images can run fine without the "registry" service.

root #rc-update add docker default
root #rc-service docker start
root #rc-update add registry default
root #rc-service registry start

Related: https://forums.gentoo.org/viewtopic-p-8693157.html#8693157 Regox (talk) 19:46, 26 February 2022 (UTC)

Thanks for the heads up! Very useful.
I've made a rather noncommittal change to avoid pushing anyone to do things that aren't needed, but I don't know enough about this to do more. Any further input would be much appreciated ;) Gentoo_Wiki:Contributor's_Guide.
-- Ris (talk) 02:46, 27 February 2022 (UTC)