Files
mkdocs/docs/Synology/Docker/index.md
2025-03-25 15:52:48 +01:00

2.1 KiB

Docker

Installation

Installer le paquet Container Manager dans DSM

DockerHub

Redémarrer Container Manager
$ systemctl list-units --type=service --all | grep -i docker
  pkg-ContainerManager-dockerd.service                                  loaded    active   running Docker Application Container Engine
  pkg-ContainerManager-event-watcherd.service                           loaded    active   running Docker event watch service

$ sudo systemctl restart pkg-ContainerManager-dockerd

Utilisation

Mise-à-jour des containers (Container Manager - WatchTower)

Ports

ERROR: could not find an available, non-overlapping IPv4 address pool among the defaults to assign to the network 

Ajouter à /etc/docker/daemon.json (ou le créer)

{
  "default-address-pools" : [
    {
      "base" : "172.17.0.0/12",
      "size" : 20
    },
    {
      "base" : "192.168.0.0/16",
      "size" : 24
    }
  ]
}

Autre solution:

networks:
  default:
    driver: bridge
    ipam:
      config:
        - subnet: 172.16.57.0/24

https://straz.to/2021-09-08-docker-address-pools/

https://jareklipski.medium.com/docker-can-only-create-31-default-networks-e7f98f778626

https://serverfault.com/questions/916941/configuring-docker-to-not-use-the-172-17-0-0-range

https://stackoverflow.com/questions/43720339/docker-error-could-not-find-an-available-non-overlapping-ipv4-address-pool-am

Containers

Login

$ sudo docker login --username=foo

# WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
$ cat ~/my_password.txt | docker login --username foo --password-stdin

https://www.howtogeek.com/devops/how-to-login-to-docker-hub-and-private-registries-with-the-docker-cli/

Backups

https://mariushosting.com/synology-how-to-back-up-docker-containers/