On Ubuntu 20.04:
cat /etc/os-release
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable"
sudo apt update
sudo apt install docker-ce
which docker
docker version
sudo curl -L "https://github.com/docker/compose/releases/download/v2.2.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
docker-compose version
mkdir photoprism
cd photoprism/
wget https://dl.photoprism.app/docker/docker-compose.yml
docker-compose up -d
# SSH to local docker container with container name
docker ps # to get all container names
docker exec -it photoprism-mariadb-1 /bin/bash
docker exec -it photoprism-photoprism-1 /bin/bash
# find docker container IP by container name
docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' photoprism-mariadb-1
# return 172.18.0.3
# connect to mariadb database
mariadb --host 172.18.0.2 -P 3306 --user photoprism -pinsecure
# not display line numbers -> convenient copy commands
history -w history.txt