Registry push + leave swarm
This commit is contained in:
parent
b8e2fbfae2
commit
a721edd706
1 changed files with 20 additions and 6 deletions
|
@ -119,13 +119,20 @@ On va donc lancer la commande sur les 2 slaves.
|
|||
On vérifie que tout s'est bien passé :
|
||||
|
||||
```
|
||||
# docker node ls
|
||||
ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS
|
||||
3ha23m6hqd31tly5mg28ngpcd swarm-slave-02 Ready Active
|
||||
unf2nknn2w6zmhyhuqbpk6py9 * scw-7509af Ready Active Leader
|
||||
zp3qgmbfxteflon7vwv4qt7vp scw-c9986a Ready Active
|
||||
$ docker node ls
|
||||
ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS
|
||||
6wyl4ozytbgdeak4s6sahs2zo * rincevent Ready Active Leader
|
||||
i2lg4r3nsnvl9i8s0rr3t4fcy insalan Ready Active
|
||||
```
|
||||
|
||||
Pour quitter le swarm, la commande est :
|
||||
|
||||
```
|
||||
docker swarm leave --force
|
||||
```
|
||||
|
||||
*Le --force est seulement nécessaire pour les managers*
|
||||
|
||||
## Lancer un docker registry pour stocker nos images
|
||||
|
||||
* [Déployer un docker registry](https://docs.docker.com/registry/deploying/)
|
||||
|
@ -159,4 +166,11 @@ docker service rm registry
|
|||
|
||||
## Build nos images et les publier sur le registry
|
||||
|
||||
*en cours de rédaction*
|
||||
Pour chaque image, on va la build sur un des serveurs du swarm (car le repository n'est accessible que depuis localhost) et la publier :
|
||||
|
||||
```
|
||||
cd mon_image/
|
||||
docker build -t mon_image .
|
||||
docker tag mon_image localhost:5000/mon_image
|
||||
docker push localhost:5000/mon_image
|
||||
```
|
||||
|
|
Loading…
Reference in a new issue