Migration from Docker repositories to Debian official repositories#

If you installed Docker using the Docker repository (reference) you can migrate to the official Debian stable repository

See also

  • Install Docker Engine on Debian 1

  1. stop the existing docker daemon

    systemctl stop docker docker.socket
  2. backup all files related to docker, for example /etc/docker/daemon.json , the service file (if you modified it) and the Docker file directory

  3. remove the existing Docker packages

    apt-get purge docker-ce docker-ce-cli
  4. install the new packages

    apt-get update
    apt-get install --reinstall docker containerd
  5. check that the Docker daemon is working

    systemctl status docker docker.socket
  6. remove the Docker repository from /etc/apt/sources.list



See also

  • Docker - ArchWiki 2

  1. install Docker and docker-compose

    apt-get update
    apt-get install docker containerd docker-compose
  2. create the jobs directories. All docker compose files will be under /home/jobs/scripts/by-user/root/docker/${project_name}

    mkdir -p /home/jobs/scripts/by-user/root/docker
    chmod 700 /home/jobs/scripts/by-user/root/docker
  3. make sure that Docker containers uses network addresses from a known range. Edit the Docker daemon file

    2  "default-address-pools":
    3  [
    4   {"base": "", "size": 24}
    5  ]
  4. restart Docker

    systemctl restart docker.service docker.socket
  5. check that the Docker daemon is still working

    systemctl status docker docker.socket


If you installed docker-compose using the root user from pip you must first manually remove docker-compose and all its dependencies from /usr/local/lib/python3.*/dist-packages/ using pip uninstall as command.

docker-compose services#

See also

  • Run multiple Docker Compose services on Debian/Ubuntu 3

All docker compose services reported here are an adaptation of this reference.

Go into the directory containing the compose file and test the service with

docker-compose pull
docker-compose up --remove-orphans

Run the following to quit the service

docker-compose down --remove-orphans


1 Apache License, copyright (c) Docker contributors

2 GNU Free Documentation License 1.3 or late, copyright (c) ArchWiki contributors

3 MIT License, copyright (c) 2019 Hetzner Online GmbH