# docker

https://docs.docker.com/



### macOS

Docker ne fonctionne pas nativement sur Mac car le noyau de macOS n'est pas compatible (BSD vs Linux). Docker fonctionne en fait dans une machine virtuelle utilisant HyperKit.

Le fichier Docker.raw que vous avez mentionné ci-dessus est le disque virtuel de cette machine virtuelle.

Toutes les images Docker sont stockées à l'intérieur de la machine virtuelle (dans le fichier Docker.raw), vous ne pouvez donc pas les voir sur le système de fichiers du Mac.

```bash
~/Library/Containers/com.docker.docker/Data/vms/0/data 
.rw-r--r--@ 60Gi bruno staff  6 jan 16:01  23 jul  2021  Docker.raw
```

Régler la taille et l'emplacement de la VM: Dashboard -> Settings -> Resources -> Advanced (réduire la taille de la VM supprime les images,containers et volumes)

https://docs.docker.com/desktop/faqs/macfaqs/



### Containers installés:

#### Synology Docker GUI:

| Container                          | Image                                       | Version | Date DL |
| ---------------------------------- | ------------------------------------------- | ------- | ------- |
| bizmodeller-mymediaforalexa-amd641 | bizmodeller/mymediaforalexa-amd64:1.3.135.0 |         |         |
| homebridge                         | oznu/homebridge:latest                      |         |         |
| hoobs                              | hoobs/hoobs:latest                          |         |         |
| photonix                           | damianmoore/photonix:latest                 |         |         |
| PiHole                             | pihole/pihole:latest                        |         |         |
| photoshow                          | linuxserver/photoshow:latest                |         |         |

#### Portainer:

| Container | Image | Version | Date DL |
| --------- | ----- | ------- | ------- |
|           |       |         |         |
|           |       |         |         |

Portainer et Watchtower sont installés depuis le terminal (voir plus bas).



Docker

bruno@DS916:/volume1/homes/bruno $ docker --version
Docker version 18.09.8, build bfed4f5

bruno@DS916:/volume1/homes/bruno $ docker-compose --version
docker-compose version 1.24.0, build 0aa59064

Update docker-compose
https://www.smarthomebeginner.com/synology-docker-media-server/



## id

```bash
bruno@DS916:~ $ id
uid=1026(bruno) gid=100(users) groups=100(users),101(administrators)
```

```bash
$ id
uid=501(bruno) gid=20(staff) groups=20(staff),12(everyone)...

$ id -u
501

$ id -g
20
```



## docker-compose

mkdir -p /volume1/docker/personal/ghost/ghost
chown 1000:1000 /volume1/docker/personal/ghost/ghost


Créer un fichier **docker-compose.yml** dans **/volume1/docker/personal/ghost**
(pas de TAB)

```bash
/volume1/docker/personal/ghost $ sudo docker-compose up -d
```

Le container doit alors apparaitre dans Synology DSM Docker



```bash
$ docker-compose stop photoprism
ERROR: Couldn't connect to Docker daemon at http+docker://localhost - is it running?

$ sudo docker-compose stop photoprism
Password:
Stopping photoprism_photoprism_1 ... done
```



## MAJ

Pour mettre à jour le container, supprimer le container dans la GUI et relancer `docker-compose up -d`

```bash
/volume1/docker/personal/ghost $ sudo docker-compose pull
/volume1/docker/personal/ghost $ sudo docker-compose up -d
```

```bash
$ docker-compose up --force-recreate --build -d
```

http://tonylawrence.com/posts/unix/synology/free-your-synology-ports/

Arreter un container:

```bash
$ docker-compose down
```

 


## Containers:

**Liste des containers qui tournent:**

```bash
$ docker ps (Docker <1.13)
$ docker container ls
CONTAINER ID        IMAGE                     COMMAND                  CREATED             STATUS                   PORTS                                                           NAMES
104f0c7e80a1        postgres:11.1-alpine      "docker-entrypoint.s…"   About an hour ago   Up About an hour         5432/tcp                                                        photonix-postgres
4c66e278fd6d        gitlab/gitlab-ce:latest   "/assets/wrapper"        9 months ago        Up 2 hours (unhealthy)   0.0.0.0:922->22/tcp, 0.0.0.0:81->80/tcp, 0.0.0.0:444->443/tcp   gitlab
```

```bash
$ docker container ls --format 'table {{.Names}}\t{{.Status}}'
NAMES                                STATUS
watchtower                           Up 38 minutes
portainer                            Up 2 hours
photonix                             Up 20 hours
homebridge                           Up 2 days
bizmodeller-mymediaforalexa-amd641   Up 13 days
PiHole                               Up 3 weeks (healthy)

$ docker ps --format "table {{.ID}}\t{{.Image}}\t{{.Command}}\t{{.CreatedAt}}\t{{.Status}}\t{{.Ports}}\t{{.Names}}\t{{.Networks}}\t{{.Mounts}}"
CONTAINER ID        IMAGE                    COMMAND             CREATED AT                      STATUS              PORTS                                            NAMES               NETWORKS            MOUNTS
18fba7e277be        portainer/portainer-ce   "/portainer"        2020-11-09 22:22:47 +0100 CET   Up 15 hours         0.0.0.0:8000->8000/tcp, 0.0.0.0:9000->9000/tcp   portainer           bridge              portainer_data,/run/host-serv…

```

**Liste des containers stoppés:**

```bash
$ docker ps --filter "status=exited"
$ docker container ls -f "status=exited"
CONTAINER ID        IMAGE                         COMMAND                  CREATED             STATUS                        PORTS                    NAMES
842cbbada398        damianmoore/photonix:latest   "/bin/sh -c ./system…"   About an hour ago   Exited (137) 50 minutes ago                            photonix
23c90981855b        redis:3.2.8                   "docker-entrypoint.s…"   About an hour ago   Exited (0) 50 minutes ago                              photonix-redis
d2b481b91f10        portainer/portainer           "/portainer"             9 months ago        Exited (2) 9 months ago                                magical_pare
9763d849e8b1        portainer/portainer           "/portainer"             9 months ago        Exited (255) 9 months ago     0.0.0.0:9000->9000/tcp   affectionate_antonelli
```

**Etat d'un container:**

```bash
$ docker inspect -f '{{.State.Status}}' mycontainer

# created : n'a jamais été lancé depuis qu'il a été crée (docker create)
# running : en cours d'exécution (docker start)
# restarting : redémarre (no, on-failure, always, unless-stopped)
# exited : le process a l'intérieur du container est terminé
# paused : les process sont suspendus pour une durée indéterminée (consommation mémoire identique à l'état 'running')
# dead : le container est non fonctionnel. Il ne peut pas être redémarré, mais juste supprimé.

```

**Liste de tous les containers:**

```bash
$ docker ps --all
$ docker container ls --all
CONTAINER ID        IMAGE                         COMMAND                  CREATED             STATUS                        PORTS                                                           NAMES
842cbbada398        damianmoore/photonix:latest   "/bin/sh -c ./system…"   About an hour ago   Exited (137) 54 minutes ago                                                                   photonix
104f0c7e80a1        postgres:11.1-alpine          "docker-entrypoint.s…"   About an hour ago   Up About an hour              5432/tcp                                                        photonix-postgres
23c90981855b        redis:3.2.8                   "docker-entrypoint.s…"   About an hour ago   Exited (0) 54 minutes ago                                                                     photonix-redis
4c66e278fd6d        gitlab/gitlab-ce:latest       "/assets/wrapper"        9 months ago        Up 2 hours (unhealthy)        0.0.0.0:922->22/tcp, 0.0.0.0:81->80/tcp, 0.0.0.0:444->443/tcp   gitlab
d2b481b91f10        portainer/portainer           "/portainer"             9 months ago        Exited (2) 9 months ago                                                                       magical_pare
9763d849e8b1        portainer/portainer           "/portainer"             9 months ago        Exited (255) 9 months ago     0.0.0.0:9000->9000/tcp                                          affectionate_antonelli
```

**Liste des ID des containers qui tournent:**

```bash
$ docker ps -q
$ docker container ls -q
104f0c7e80a1
4c66e278fd6d
```

**Démarrer un container:**

```bash
# Démarre un container déjà crée mais arrêté.

$ docker start photoprism_photoprism_1
photoprism_photoprism_1
$ docker start 4beabb9fd090
4beabb9fd090
```

**Stopper un container:**

```bash
$ docker stop gitlab
gitlab
$ docker stop 4c66e278fd6d
4c66e278fd6d
```

**Stopper tous les containers:**

```bash
$ docker container stop $(docker container ls -aq)
```


**Stopper tous les containers associés à une image:**

```bash
$ docker ps -q --filter ancestor=IMAGE_NAME | xargs docker stop
```


**Supprimer un container:**

```bash
$ docker container rm d2b481b91f10 9763d849e8b1
d2b481b91f10
9763d849e8b1
```

```bash
$ sudo docker rm b5576f445729
Error response from daemon: You cannot remove a running container b5576f44572913f1154e429b2bc84f84e696f4006adbaf8c2fb44f9dc1ff013a. Stop the container before attempting removal or force remove

$ sudo docker rm b5576f445729 --force
b5576f445729
```

**Supprimer tous les containers:**

```bash
$ docker container rm $(docker container ls -aq)
```

**Exécuter une commande dans un container:**

```bash
$ sudo docker container ls --format 'table {{.ID}}\t{{.Names}}'
CONTAINER ID        NAMES
700a2cd00cba        lychee

$ sudo docker container exec 700a2cd00cba hostname
700a2cd00cba

$ sudo docker container exec 700a2cd00cba hostname -I
172.18.0.3
```

**Se connecter en root à un container:**

```bash
$ sudo docker container ls --format 'table {{.ID}}\t{{.Names}}'
CONTAINER ID        NAMES
700a2cd00cba        lychee

$ sudo docker exec -it 700a2cd00cba bash
```

**Créer et démarrer un container:**

```bash
$ docker container run
```

```bash
$ docker run
```

**Renommer un container:**

```bash
$ docker rename photoprism_photoprism_1 photoprism_1
```



## Images:

**Liste des images:**

```bash
$ docker image ls
REPOSITORY                          TAG                 IMAGE ID            CREATED             SIZE
oznu/homebridge                     latest              3fa073f20624        4 days ago          625MB
hoobs/hoobs                         latest              c35c2f7222f3        4 days ago          558MB
linuxserver/photoshow               latest              fd8dc782b92c        8 days ago          214MB
damianmoore/photonix                latest              79aeacedba12        2 weeks ago         825MB
portainer/portainer-ce              latest              a0a227bf03dd        2 months ago        196MB
bizmodeller/mymediaforalexa-amd64   1.3.135.0           298c7bdbf981        2 months ago        111MB
pihole/pihole                       latest              4642d275ab73        3 months ago        296MB
v2tec/watchtower                    latest              3069a9fb302a        2 years ago         9.49MB
```

Changer le [format de la sortie](https://docs.docker.com/engine/reference/commandline/images/#format-the-output):

```
$ docker images --format "table {{.Repository}}\t{{.Tag}}\t{{.ID}}\t{{.CreatedAt}}\t{{.Size}}"
REPOSITORY                          TAG                 IMAGE ID            CREATED AT                       SIZE
oznu/homebridge                     latest              3fa073f20624        2020-11-06 07:05:24 +0100 CET    625MB
hoobs/hoobs                         latest              c35c2f7222f3        2020-11-05 15:17:26 +0100 CET    558MB
linuxserver/photoshow               latest              fd8dc782b92c        2020-11-02 11:12:54 +0100 CET    214MB
damianmoore/photonix                latest              79aeacedba12        2020-10-24 10:06:20 +0200 CEST   825MB
portainer/portainer-ce              latest              a0a227bf03dd        2020-08-31 11:04:47 +0200 CEST   196MB
bizmodeller/mymediaforalexa-amd64   1.3.135.0           298c7bdbf981        2020-08-18 22:00:10 +0200 CEST   111MB
pihole/pihole                       latest              4642d275ab73        2020-08-10 04:45:33 +0200 CEST   296MB
v2tec/watchtower                    latest              3069a9fb302a        2018-03-02 16:09:26 +0100 CET    9.49MB
```

Pour avoir ce format par défaut, ajouter   `"imagesFormat": "table {{.Repository}}\\t{{.Tag}}\\t{{.ID}}\\t{{.Size}}\\t{{.CreatedAt}}"` dans le `~/.docker/config.json`

Sur une connection ssh: `ssh foo@bar docker images --format "$(jq .imagesFormat < ~/.docker/config.json)"`



**Supprimer une image:**

```bash
$ docker image rm 75835a67d134
```

**Supprimer toutes les images non référencées par un container existant:**

```bash
$ docker image prune -a
```

Infos sur une image:

```bash
$ docker image inspect 79aeacedba12
[
    {
        "Id": "sha256:79aeacedba12f180af279aa030c7a64a0b2a9dc428a1dc1c4c074caafa05426d",
        "RepoTags": [
            "damianmoore/photonix:latest"
        ],
        "RepoDigests": [
            "damianmoore/photonix@sha256:ae3ab04f67eadfaaf58da125665b198bca02e3d0ec6025b9cb379969de610a2c"
        ],
        "Parent": "",
        "Comment": "",
        "Created": "2020-10-24T08:06:20.266765865Z",
        
 
# Date de création d'une image:

$ docker image inspect 79aeacedba12 | grep 'Created'
        "Created": "2020-10-24T08:06:20.266765865Z",

```



## Volumes:

**Liste des volumes:**

```bash
$ docker volume ls
DRIVER              VOLUME NAME
local               4a0cb49ef186f5b6b920cb783e9c7a3d80065d13575dbe956a0875451490e009
local               9d1fbf38c96c6474e159d512ff218c67ff7307c42f46cb01724358db854f3dd9
local               1057b3bf15c1adb34f50614c098ab821d39fb14b234ffc996dd84ad36778bc1d
local               e9fa91a626cb4ed70e273272d0865717a2d74343a5c644459c34f5914e9f0ecb
local               portainer_data
```

**Supprimer un volume:**

```bash
$ docker volume rm 4a0cb49ef186f5b6b920cb783e9c7a3d80065d13575dbe956a0875451490e009
4a0cb49ef186f5b6b920cb783e9c7a3d80065d13575dbe956a0875451490e009
```

**Supprimer tous les volumes inutilisés:**

```bash
$ docker volume prune
WARNING! This will remove all local volumes not used by at least one container.
Are you sure you want to continue? [y/N] y
Total reclaimed space: 0B
```



## Réseaux:

**Liste des réseaux:**

```bash
$ docker network ls
NETWORK ID          NAME                DRIVER              SCOPE
cb8db3bfdaa8        bridge              bridge              local
5a1ec0a7d634        host                host                local
51e54153c11f        none                null                local
b43d3ebd9c3f        photonix_default    bridge              local
a522745b92b7        pixapop_default     bridge              local
```

**Supprimer tous les réseaux inutilisés:**

```bash
$ docker network prune
```

**Supprimer tous les réseaux crées il y a plus de 12h:**

```bash
$ docker network prune --filter "until=12h"
WARNING! This will remove all custom networks not used by at least one container.
Are you sure you want to continue? [y/N] y
```

**Voir les containers attaché à un réseau:**

```bash
$ docker network inspect --format '{{range $cid,$v := .Containers}}{{printf "%s: %s\n" $cid $v.Name}}{{end}}' "<network_id>"
```



## Stats:

```bash
$ docker stats
CONTAINER ID        NAME                CPU %               MEM USAGE / LIMIT     MEM %               NET I/O             BLOCK I/O           PIDSCONTAINER ID        NAME                CPU %               MEM USAGE / LIMIT     MEM %               NET I/O             BLOCK I/O           PIDS
18fba7e277be        portainer           0.00%               11.86MiB / 1.941GiB   0.60%               773kB / 6.04MB      287kB / 3.53MB      12
```



## Prune:

```bash
$ sudo docker system prune
Password:
WARNING! This will remove:
        - all stopped containers
        - all networks not used by at least one container
        - all dangling images
        - all dangling build cache
Are you sure you want to continue? [y/N] y
Deleted Containers:
b73a0a237e53a686d8d11cedb66677a7b2681b43701a12f9bdc36a4bd35b1302
042c7b1cbd3986267a395915d88974a04eccc4baec0ecaa8dcab517db39fedc3
abd5940cc1127fb0cb9038ce179ef35c12fd5816ece403429b52f99f81c5b28f
146e06c1be5b7d1385326e04880d01e2e1a3a090d4db86f9c2120b75844aa952

Deleted Networks:
data_export
pixapop_default

Total reclaimed space: 242.4MB
```



## Info:

```bash
bruno@DS916:/volume1/docker/photoshow2 $ sudo docker info
Password:
Containers: 6
 Running: 5
 Paused: 0
 Stopped: 1
Images: 7
Server Version: 18.09.8
Storage Driver: btrfs
Logging Driver: db
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge host macvlan null overlay
 Log: awslogs db fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 0cf16177dbb234350dc27dd2bbd1d7cebd098108
runc version: 6cc9d3f2cd512eeb3d548e2f6b75bcdebc779d4d
init version: e01de58 (expected: fec3683)
Security Options:
 apparmor
Kernel Version: 3.10.105
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 1.872GiB
Name: DS916
ID: TBHV:43JW:H65O:Y25A:ML34:P52M:ZNPT:ASUK:GBMY:73Y5:2GMW:42RL
Docker Root Dir: /volume1/@docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false
```



Ou sont stockés les images et containers:

|                        |                                                              |
| ---------------------- | ------------------------------------------------------------ |
| Ubuntu, Debian, Fedora | /var/lib/docker/                                             |
| Windows                | C:\ProgramData\DockerDesktop                                 |
| macOS                  | ~/Library/Containers/com.docker.docker/Data/vms/0/           |
| Synology DSM           | root@DS916:/volume1/@docker/image/btrfs/imagedb/content/sha256 |



```bash
root@DS916:/volume1/@docker/image/btrfs/imagedb/content/sha256# ls
298c7bdbf9810c612242d697ba093a16d2d6d14ba2b2de6b0b9bba4f2a7903b1  4642d275ab7382c208b5ba81f78b672166833fca2f5e3085b93904099f167e47  c35c2f7222f372a2d0b26c7dbab566af74cbbb057bf5632103978063ad8423d8
3069a9fb302acfc664970a4cdb962b9915f15aeb089b6216f17edcd29d5dfc80  79aeacedba12f180af279aa030c7a64a0b2a9dc428a1dc1c4c074caafa05426d  fd8dc782b92cf0bdfa4d35ab3b857f1ffdb6ea7c6bb77c7436d7ca458038042c
3fa073f206248faf2c4cc11108386ec1d3d3070fc120b0d781d2d9985d88681e  a0a227bf03ddc8b88bbb74b1b84a8a7220c8fa95b122cbde2a7444f32dc30659
```

```bash
root@DS916:/volume1/@docker/image/btrfs/imagedb/content/sha256# docker image ls
REPOSITORY                          TAG                 IMAGE ID            CREATED             SIZE
oznu/homebridge                     latest              3fa073f20624        4 days ago          625MB
hoobs/hoobs                         latest              c35c2f7222f3        4 days ago          558MB
linuxserver/photoshow               latest              fd8dc782b92c        8 days ago          214MB
damianmoore/photonix                latest              79aeacedba12        2 weeks ago         825MB
portainer/portainer-ce              latest              a0a227bf03dd        2 months ago        196MB
bizmodeller/mymediaforalexa-amd64   1.3.135.0           298c7bdbf981        2 months ago        111MB
pihole/pihole                       latest              4642d275ab73        3 months ago        296MB
v2tec/watchtower                    latest              3069a9fb302a        2 years ago         9.49MB
```

Ports exposés par tous les containers:

```bash
 $ sudo docker container ls --format "table {{.ID}}\t{{.Names}}\t{{.Ports}}" -a
CONTAINER ID        NAMES                                PORTS
8ccdd13f4c96        portainer
c893138cd738        pihole
3fa2cd3a0f35        lychee_db                            3306/tcp
17517d71273d        photonix                             0.0.0.0:8888->80/tcp
4ed16c697cec        photoprism_photoprism_1              0.0.0.0:2342->2342/tcp
21cfbfda061f        homebridge
91345de863d2        lychee                               0.0.0.0:90->80/tcp
b99364278d8f        photonix-postgres
0e7770c37073        photonix-redis
c3e247ccfebd        pigallery2                           0.0.0.0:35000->80/tcp
d98f08308f24        Watchtower                           8080/tcp
5dbb7fd0d513        hoobs
b47b4299cc38        bizmodeller-mymediaforalexa-amd641   0.0.0.0:52050-52051->52050-52051/tcp

```



## Portainer:

**Installer Portainer (macOS):**

```bash
~/Documents/docker master* ⇡
$ docker volume create portainer_data
portainer_data

~/Documents/docker master* ⇡
$ docker run -d -p 8000:8000 -p 9000:9000 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce
Unable to find image 'portainer/portainer-ce:latest' locally
latest: Pulling from portainer/portainer-ce
d1e017099d17: Already exists
b0718b1ef1b0: Pull complete
Digest: sha256:0ab9d25e9ac7b663a51afc6853875b2055d8812fcaf677d0013eba32d0bf0e0d
Status: Downloaded newer image for portainer/portainer-ce:latest
18fba7e277beac21a46145c294737c95fe2b3c33f2097a66980127a295b27bb3
```

**Installer Portainer (Synology DSM):**

```bash
$ mkdir /volume1/docker/portainer
$ cd /volume1/docker/portainer
bruno@DS916:/volume1/docker/portainer $ sudo docker run -d -p 8000:8000 -p 9000:9000 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v /volume1/docker/portainer:/data portainer/portainer-ce
```

Un container n'est plus visible dans la GUI Synology si il a été modifié dans Portainer.
De même, tout container crée dans Portainer n'est pas visible dans la GUI Synology.

**Télécharger une image:**

Dans Portainer -> Images -> Pull image, entrer le nom de l'image (linuxserver/sonarr par ex) trouvé sur [DockerHub](https://hub.docker.com/r/linuxserver/sonarr).

**Créer un nouveau container:**

Dans Portainer -> Containers -> Image, entrer le nom de l'image (linuxserver/sonarr par ex) trouvé sur [DockerHub](https://hub.docker.com/r/linuxserver/sonarr).

**Manual network port publishing** : 

host 8989 - container 8989

host 9898 - container 9898



## Watchtower:

```
# v2tec/watchtower 				non maintenu
# containrrr/watchtower		maintenu
```

**Installer Watchtower (Synology DSM):**

```bash
bruno@DS916:~ $ sudo docker run -d --name watchtower -v /var/run/docker.sock:/var/run/docker.sock containrrr/watchtower
```

https://www.nas-forum.com/forum/topic/63740-tuto-mise-à-jour-automatique-des-containers-docker/



```bash
docker run -d \
  --name Watchtower \
  -e TZ=Europe/Paris \
  -e WATCHTOWER_CLEANUP=true \
  -e WATCHTOWER_DEBUG=true \
  -e WATCHTOWER_INCLUDE_STOPPED=true \
  -e WATCHTOWER_REVIVE_STOPPED=true \
  -e WATCHTOWER_POLL_INTERVAL=3600  \
  -v /var/run/docker.sock:/var/run/docker.sock \
  containrrr/watchtower
  
# efface les anciennes images quand de nouvelles sont téléchargées
# inclus les containers arrêtés et les réactive si ils ont été mis à jour
# active le loging verbeux
# cherche les mises à jour 1x par heure
```

```bash
docker run -d \
  --name Watchtower \
  -e TZ=Europe/Paris \
  -e WATCHTOWER_CLEANUP=true \
  -e WATCHTOWER_DEBUG=true \
  -e WATCHTOWER_INCLUDE_STOPPED=true \
  -e WATCHTOWER_REVIVE_STOPPED=true \
  -e WATCHTOWER_SCHEDULE="0 0 * * * *"  \
  -e WATCHTOWER_ROLLING_RESTART=true \
  -v /var/run/docker.sock:/var/run/docker.sock \
  containrrr/watchtower


WATCHTOWER_NOTIFICATIONS_LEVEL=debug
      - WATCHTOWER_NOTIFICATIONS=email
      - WATCHTOWER_NOTIFICATION_EMAIL_FROM=user@free.fr
      - WATCHTOWER_NOTIFICATION_EMAIL_TO=user@free.fr
      - WATCHTOWER_NOTIFICATION_EMAIL_SERVER=smtp.free.fr
      - WATCHTOWER_NOTIFICATION_EMAIL_SERVER_PORT=587
      - WATCHTOWER_NOTIFICATION_EMAIL_SERVER_USER=user
      - WATCHTOWER_NOTIFICATION_EMAIL_SERVER_PASSWORD=MdP mail free
      - WATCHTOWER_NOTIFICATION_EMAIL_DELAY=2
      
      
      WATCHTOWER_NOTIFICATIONS_LEVEL=debug
      
      WATCHTOWER_ROLLING_RESTART
      
      
      WATCHTOWER_SCHEDULE="0 0 4 * * *"
      WATCHTOWER_SCHEDULE="0 0 * * * *"
      
      Field name   | Mandatory? | Allowed values  | Allowed special characters
----------   | ---------- | --------------  | --------------------------
Seconds      | Yes        | 0-59            | * / , -
Minutes      | Yes        | 0-59            | * / , -
Hours        | Yes        | 0-23            | * / , -
Day of month | Yes        | 1-31            | * / , - ?
Month        | Yes        | 1-12 or JAN-DEC | * / , -
Day of week  | Yes        | 0-6 or SUN-SAT  | * / , - ?
```

```
Entry                  | Description                                | Equivalent To
-----                  | -----------                                | -------------
@yearly (or @annually) | Run once a year, midnight, Jan. 1st        | 0 0 0 1 1 *
@monthly               | Run once a month, midnight, first of month | 0 0 0 1 * *
@weekly                | Run once a week, midnight between Sat/Sun  | 0 0 0 * * 0
@daily (or @midnight)  | Run once a day, midnight                   | 0 0 0 * * *
@hourly                | Run once an hour, beginning of hour        | 0 0 * * * *
```



```bash
$ docker top

$ docker service ls
Error response from daemon: This node is not a swarm manager. Use "docker swarm init" or "docker swarm join" to connect this node to swarm and try again.

$ docker node ls
Error response from daemon: This node is not a swarm manager. Use "docker swarm init" or "docker swarm join" to connect this node to swarm and try again.

$ docker config ls
Error response from daemon: This node is not a swarm manager. Use "docker swarm init" or "docker swarm join" to connect this node to swarm and try again.

```



```
If you're using the Synology web ui for Docker, pull latest stable, stop, rename, create new, start

Happy with the new version? Delete the prior container version. Done. The longest part (for me) of doing a container upgrade is pulling & unpacking the updated container image.


```



```
This is how I update my containers on Synology Docker;

Open the Docker package.
Go to the Registry, and search for the image.
Click download, and choose the 'latest' tag
This will download the latest image and overwrite the existing older image.
Stop the container that was built on the old image.
Highlight it and select the Clear action.
Restart the container and it will be built from the new image.

This assumes that you've correctly mapped your container /config directory to the local volume, so all the config will be used by the updated image.
```

web based interface to monitor your Docker container logs live

docker run -d \
--name dozzle \
--volume=/var/run/docker.sock:/var/run/docker.sock \
-p 8888:8080 \
amir20/dozzle:latest





### Applications:



Docstation (Mac/Win/Linux)

https://github.com/DockStation/dockstation/releases

Docker compose UI (container)

https://github.com/francescou/docker-compose-ui

Ouroboros (! stopped)

https://github.com/pyouroboros/ouroboros



