mirror of
https://gitea.com/mcereda/oam.git
synced 2026-02-10 06:04:24 +00:00
1.3 KiB
1.3 KiB
Docker
TL;DR
# Run containers.
docker run hello-world
docker run -ti --rm alpine cat /etc/apk/repositories
docker run -d --name boinc --network=host --pid=host -v "boinc:/var/lib/boinc" \
-e BOINC_GUI_RPC_PASSWORD="123" -e BOINC_CMD_LINE_OPTIONS="--allow_remote_gui_rpc" \
boinc/client
# Show containers status.
docker ps --all
# Cleanup.
docker system prune -a
Daemon configuration
The docker daemon is configured using the /etc/docker/daemon.json file:
{
"default-runtime": "runc",
"dns": ['8.8.8.8', '1.1.1.1']
}
Containers configuration
Docker mounts specific system files in all containers to forward its settings:
6a95fabde222$ mount
…
/dev/disk/by-uuid/1bb…eb5 on /etc/resolv.conf type btrfs (rw,…)
/dev/disk/by-uuid/1bb…eb5 on /etc/hostname type btrfs (rw,…)
/dev/disk/by-uuid/1bb…eb5 on /etc/hosts type btrfs (rw,…)
…
Those files come from the volume the docker container is using for its root, and are modified on the container's startup with the information from the CLI, the daemon itself and, when missing, the host.