Resources attached to the Road To DevOps tutorial
https://blog.noobtoroot.xyz/road-to-devops/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
57 lines
1.1 KiB
57 lines
1.1 KiB
2 years ago
|
# TP5
|
||
|
|
||
|
Créer un Registry local.
|
||
|
|
||
|
Pousser une image.
|
||
|
|
||
|
Récupérer une image.
|
||
|
|
||
|
|
||
|
|
||
|
* Créer un service registry à l'aide
|
||
|
de l'image officielle `registry:2`
|
||
|
et le publier sur le port 5000.
|
||
|
|
||
|
* Tester la disponibilité du registry.
|
||
|
|
||
|
|
||
|
<!-- .slide: data-background="#2E2E2E" data-state="medium-code" -->
|
||
|
```
|
||
|
$ docker service create --name registry --publish 5000:5000 registry:2
|
||
|
```
|
||
|
|
||
|
```
|
||
|
$ curl 127.0.0.1:5000/v2/_catalog
|
||
|
{"repositories":[]}
|
||
|
|
||
|
```
|
||
|
|
||
|
|
||
|
* Pousser l'image `debian-formation` sur le registry en utilisant les tags pour préciser l'adresse du registry, ici `127.0.0.1:5000`.
|
||
|
|
||
|
* Récupérer l'image `debian-formation` sur tous les noeuds.
|
||
|
|
||
|
|
||
|
<!-- .slide: data-background="#2E2E2E" -->
|
||
|
```
|
||
|
$ docker tag debian-formation:3 127.0.0.1:5000/debian-formation:3
|
||
|
```
|
||
|
|
||
|
|
||
|
<!-- .slide: data-background="#2E2E2E" -->
|
||
|
```
|
||
|
$ docker push 127.0.0.1:5000/debian-formation:3
|
||
|
```
|
||
|
|
||
|
<!-- .slide: data-background="#2E2E2E" -->
|
||
|
```
|
||
|
$ curl 127.0.0.1:5000/v2/_catalog
|
||
|
{"repositories":["debian-formation"]}
|
||
|
```
|
||
|
|
||
|
|
||
|
<!-- .slide: data-background="#2E2E2E" -->
|
||
|
```
|
||
|
$ docker pull 127.0.0.1:5000/debian-formation:3
|
||
|
```
|