docker
This is an old revision of the document!
Table of Contents
Installing
Debian
apt update apt remove docker docker-engine docker.io containerd runc apt install -y apt-transport-https ca-certificates curl gnupg lsb-release curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null apt update apt install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin # For dependency errors, apt install -f # Convenience script... # curl -fsSL https://get.docker.com -o get-docker.sh | bash
Windows
If you already installed Docker Desktop, you can start the Docker Engine as a daemon with:
C:\Program Files\Docker\Docker\resources/dockerd.exe --register-service
Then, configure the service to start “Automatic (Delayed Start)”. Open “cmd” with Administrator privileges to run docker commands (first “docker context use default”).
Volumes
Within a docker compose file, you can define volumes that are on shared network file systems:
volumes:
nas-share:
driver_opts:
type: cifs
o: "username=[username],password=[password]"
device: "//my-nas/share"
volumes:
nfs-docker-upload:
driver_opts:
type: "nfs"
o: "addr=10.122.0.30,nfsvers=4.1,rw"
device: ":/volume1/docker/immich/upload"
services:
my-server:
container_name: my-server
image:my_server
volumes:
- nfs-docker-upload:/usr/src/app/upload
docker.1776545700.txt.gz · Last modified: by reddy
