5.4. Docker

Docker is not the only containerisation technology and not necessarily the best, but it is currently widely used. Docker Compose is a system that uses configuration files that the docker compose up -d command reads and uses.

My user had to run Docker commands with sudo. It’s possible this was giving permission issues so sudo usermod -aG docker $USER was used and means sudo is not needed for running docker compose commands.

  • sudo docker compose up --build

  • When running, d detaches it from the terminal

  • sudo docker compose down

5.4.1. Updates

You can get the latest images and run them. The compose file might have a version limitation identified so that needs changing first. Navigate to the app folder with the compose file in:

sudo docker compose pull
sudo docker compose up -d

5.4.2. Volumes

How to find the Postgres Docker volume

  • docker volume ls - list all volumes

  • docker volume rm <volume-name-or-id> - remove a volume (only works when the volume is not attached to any containers)

  • docker volume prune - remove all unused (unattached) volumes

  • sudo docker volume prune -a

5.4.3. Other

docker ps
docker logs immich_machine_learning