Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
elearning:workbooks:docker2:drf00 [2020/10/08 08:21] adminelearning:workbooks:docker2:drf00 [2022/04/29 07:59] (Version actuelle) admin
Ligne 1: Ligne 1:
 ~~PDF:LANDSCAPE~~ ~~PDF:LANDSCAPE~~
  
-Version : **2020.01**+Version : **2022.01**
  
 Dernière mise-à-jour : ~~LASTMOD~~ Dernière mise-à-jour : ~~LASTMOD~~
Ligne 148: Ligne 148:
 ====1.2 - Préparation==== ====1.2 - Préparation====
  
-Connectez-vous à la VM Debian_9 :+Vous devez vous connecter à la machine virtuelle debian9 à partir d'un terminal de votre gateway :
  
 <code> <code>
-desktop@serverXX:~$ ssh -l trainee localhost -p 2022+trainee@traineeXX:~$ ssh -l trainee 10.0.2.60
 </code> </code>
  
 +Passez en tant que **root** :
  
 +<code>
 +trainee@debian9:~$ su -
 +Mot de passe : fenestros
 +root@debian9:~#
 +</code>
  
 Créez un répertoire nommé myDocker : Créez un répertoire nommé myDocker :
Ligne 268: Ligne 274:
 </code> </code>
  
-Utilisez maintenant **lynx** à partir d'un terminal de votre machine **hôte** pour vérifier que le registre est actif :+Utilisez maintenant **lynx** à partir d'un terminal de votre machine **hôte Docker** pour vérifier que le registre est actif :
  
 <code> <code>
Ligne 309: Ligne 315:
 root@debian9:~# docker images root@debian9:~# docker images
 REPOSITORY              TAG                 IMAGE ID            CREATED             SIZE REPOSITORY              TAG                 IMAGE ID            CREATED             SIZE
-testcache               latest              c3b03bddaaad        18 minutes ago      120MB 
-<none>                  <none>              1df8c3603628        23 minutes ago      120MB 
 i2tch/mydocker          latest              c37edbd43993        45 minutes ago      193MB i2tch/mydocker          latest              c37edbd43993        45 minutes ago      193MB
 localhost:88/mydocker   latest              c37edbd43993        45 minutes ago      193MB localhost:88/mydocker   latest              c37edbd43993        45 minutes ago      193MB
-i2tch/mongodb2          latest              65e81f78c0f5        12 hours ago        240MB 
-i2tch/mongodb1          latest              2de862819e94        12 hours ago        240MB 
-i2tch/mongodb           latest              01c4aa152be2        12 hours ago        1.04GB 
-ubuntu                  latest              ccc7a11d65b1        3 weeks ago         120MB 
-centos                  latest              328edcd84f1b        4 weeks ago         193MB 
-nginx                   latest              b8efb18f159b        6 weeks ago         107MB 
-debian                  wheezy-slim         884ca0b949e5        6 weeks ago         46.9MB 
-hello-world             latest              1815c82652c0        2 months ago        1.84kB 
 registry                2.0                 3bccd459597f        2 years ago         549MB registry                2.0                 3bccd459597f        2 years ago         549MB
 </code> </code>
Ligne 328: Ligne 324:
 Actuellement, le registre privé créé ci-dessus n'est pas accessible à partir du réseau local car il est référencé par localhost. Il convient donc maintenant de mettre en place un serveur dédié. Actuellement, le registre privé créé ci-dessus n'est pas accessible à partir du réseau local car il est référencé par localhost. Il convient donc maintenant de mettre en place un serveur dédié.
  
-Créez le réseau Nat **NatNetwork** :+Connectez-vous à la VM Debian_9_1 :
  
 <code> <code>
-desktop@serverXX:~$ VBoxManage natnetwork add --netname NatNetwork --network "10.0.2.0/24" --enable +trainee@traineeXX:~$ ssh -l trainee 10.0.2.61
-desktop@serverXX:~$ VBoxManage natnetwork modify --netname NatNetwork --dhcp on +
-desktop@serverXX:~$ VBoxManage natnetwork start --netname NatNetwork+
 </code> </code>
  
-Vérifiez que votre machine virtuelle **Debian_9** est allumée :+En tant que root, modifiez le nom d'hôte de la machine :
  
 <code> <code>
-desktop@serverXX:~$ VBoxManage list runningvms +trainee@debian91:~$ su -
-"Debian_9" {0ab64831-56fb-4f1b-95cc-d6e107451742} +
-</code> +
- +
-Placez **Debian_9** dans le réseau NAT **NatNetwork** : +
- +
-<code> +
-desktop@serverXX:~$ VBoxManage controlvm Debian_9 nic1 natnetwork NatNetwork +
-</code> +
- +
-Arrêtez la VM **Debian_9** : +
- +
-<code> +
-desktop@serverXX:~$ VBoxManage controlvm Debian_9 poweroff +
-0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100% +
-</code> +
- +
-Créez un clone de la VM **Debian_9** appelé **Registry** : +
- +
-<code> +
-desktop@serverXX:~$ VBoxManage clonevm Debian_9 --name="Registry" --register --mode=all +
-0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100% +
-Machine has been successfully cloned as "Registry" +
-</code> +
- +
-Vérifiez la présence de votre clône : +
- +
-<code> +
-desktop@serverXX:~$ VBoxManage list vms +
-"Ansible" {73241c69-0827-431c-a25b-756ac6ac722c} +
-"CentOS_7" {2a6e6280-9c56-40eb-b04a-a96f397c82de} +
-"Debian_9" {0ab64831-56fb-4f1b-95cc-d6e107451742} +
-"Manager" {f1b9be7c-5cdf-459a-a47a-21cfac927966} +
-"TargetA" {66583f4a-fa27-4db5-b12f-05f36902b1ab} +
-"TargetB" {4819e950-8477-42b5-912d-6fe67cb88b9c} +
-"Web01" {f14ef311-8b34-4850-99a4-12d3ef24e63b} +
-"Web02" {62522626-8415-4810-a7c6-6c8fdb5dfef8} +
-"Web03" {16d9bf94-bfa0-46ea-9c5b-5dece023b073} +
-"Web04" {986e91a0-50e8-4170-8055-ba8ca5f0dcb3} +
-"Windows10" {c3c63823-af86-4cf3-9fb7-1e215e7b662a} +
-"Worker1" {a924df56-20d4-4638-a4d9-67a1a019591c} +
-"Worker2" {25fae873-dbba-4332-961f-24077cee5310} +
-"Debian_9_1" {38603f72-6cae-4186-a5ed-648e900cf398} +
-"Registry" {aac92847-6833-494a-8ca6-0c403a7a249a} +
-</code> +
- +
-Démarrez la machine virtuelle **Registry** : +
- +
-<code> +
-desktop@serverXX:~$ VBoxManage startvm Registry --type headless +
-</code> +
- +
-Configurez votre clone en réseau NAT : +
- +
-<code> +
-desktop@serverXX:~$ VBoxManage controlvm Registry nic1 nat +
-</code> +
- +
-Connectez-vous à votre clone : +
- +
-<code> +
-desktop@serverXX:~$ ssh -l trainee localhost -p 2022 +
-trainee@localhost's password: trainee +
-</code> +
- +
-En tant que root, modifiez le nom d'hôte de la machine ! +
- +
-<code> +
-trainee@debian9:~$ su -+
 Mot de passe : fenestros Mot de passe : fenestros
-root@debian9:~# nmcli general hostname registry +root@debian91:~# nmcli general hostname myregistry.i2tch.loc 
-root@debian9:~# hostname +root@debian91:~# hostname 
-registry+myregistry.i2tch.loc
 </code> </code>
  
-Configurez une adresse IP fixe pour la VM **Registry** :+Installez Docker :
  
 <code> <code>
-root@debian9:~# nmcli connection add con-name ip_fixe ifname enp0s3 type ethernet ip4 10.0.2.4/24 gw4 10.0.2.2 +root@debian91:~# apt-get update 
-Connexion « ip_fixe » (a84f9227-dd89-4e06-957f-cb707e83fd47) ajoutée avec succès. +root@debian91:~# apt-get install apt-transport-https ca-certificates curl gnupg2 software-properties-common 
-root@debian9:~# nmcli connection mod ip_fixe ipv4.dns 8.8.8.8 +root@debian91:~# curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add - 
-root@debian9:~# nmcli connection up ip_fixe+root@debian91:~# add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable" 
 +root@debian91:~# apt-get update 
 +root@debian91:~# apt-get install docker-ce
 </code> </code>
  
-Fermez le terminal et reconnectez-vous à votre serveur. Vérifiez que seule la VM **Registry** soit allumée :+Editez le fichier **/etc/hosts** et changez l'entrée pour l'adresse IP 10.0.2.61 :
  
 <code> <code>
-desktop@serverXX:~$ VBoxManage list runningvms +root@debian91:~# vi /etc/hosts 
-"Registry" {aac92847-6833-494a-8ca6-0c403a7a249a} +root@debian91:~# cat /etc/hosts
-</code> +
- +
-Connectez-vous à la VM **Registry** : +
- +
-<code> +
-desktop@serverXX:~$ ssh -l trainee localhost -p 2022 +
-trainee@localhost's password: trainee +
-</code> +
- +
-Vérifiez la prise en compte de la modification de l'adresse IP : +
- +
-<code> +
-trainee@registry:~$ ip a +
-1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1 +
-    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 +
-    inet 127.0.0.1/8 scope host lo +
-       valid_lft forever preferred_lft forever +
-    inet6 ::1/128 scope host  +
-       valid_lft forever preferred_lft forever +
-2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 +
-    link/ether 08:00:27:3b:0a:87 brd ff:ff:ff:ff:ff:ff +
-    inet 10.0.2.4/24 brd 10.0.2.255 scope global enp0s3 +
-       valid_lft forever preferred_lft forever +
-    inet6 fe80::eaaa:3c18:9e20:768b/64 scope link  +
-       valid_lft forever preferred_lft forever +
-</code> +
- +
-Sortez de la VM **Registry** : +
- +
-<code> +
-trainee@registry:~$ exit +
-déconnexion +
-Connection to localhost closed. +
-</code> +
- +
-Remettez la VM **Registry** dans le réseau NAT NatNetwork : +
- +
-<code> +
-desktop@serverXX:~$ VBoxManage controlvm Registry nic1 natnetwork NatNetwork +
-</code> +
- +
-Configurez la redirection des ports dans le réseau NAT NatNetwork : +
- +
-<code> +
-desktop@serverXX:~$ VBoxManage natnetwork modify --netname NatNetwork --port-forward-4 "Docker_Debian_9:tcp:[]:2022:[10.0.2.15]:22" +
-desktop@serverXX:~$ VBoxManage natnetwork modify --netname NatNetwork --port-forward-4 "Docker_Registry:tcp:[]:4022:[10.0.2.4]:22" +
-</code> +
- +
-Connectez-vous à la VM **Registry** : +
- +
-<code> +
-desktop@serverXX:~$ ssh -l trainee localhost -p 4022 +
-trainee@localhost's password: trainee +
-Linux registry 4.9.0-8-amd64 #1 SMP Debian 4.9.130-2 (2018-10-27) x86_64 +
- +
-The programs included with the Debian GNU/Linux system are free software; +
-the exact distribution terms for each program are described in the +
-individual files in /usr/share/doc/*/copyright. +
- +
-Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent +
-permitted by applicable law. +
-Last login: Fri Apr 17 15:36:25 2020 from 10.0.2.2 +
-trainee@registry:~$ su - +
-Mot de passe : fenestros +
-root@registry:~# +
-</code> +
- +
-Editez le fichier **/etc/hosts** : +
- +
-<code> +
-root@registry:~# vi /etc/hosts +
-root@registry:~# cat /etc/hosts+
 127.0.0.1 localhost 127.0.0.1 localhost
-127.0.1.1 debian9.i2tch.loc   debian9 +10.0.2.60 debian9.i2tch.loc debian9 
-10.0.2.4 myregistry.i2tch.loc    myregistry +10.0.2.61 myregistry.i2tch.loc    myregistry 
-10.0.2.15   debian9.i2tch.loc       debian9+10.0.2.62 manager.i2tch.loc manager 
 +10.0.2.63 worker1.i2tch.loc worker1 
 +10.0.2.64 worker2.i2tch.loc worker2
  
 # The following lines are desirable for IPv6 capable hosts # The following lines are desirable for IPv6 capable hosts
Ligne 514: Ligne 372:
  
 <code> <code>
-root@registry:~# cd / && mkdir certs && openssl req -newkey rsa:4096 -nodes -sha256 -keyout certs/domain.key -x509 -days 365 -out certs/domain.crt+root@debian91:~# cd / && mkdir certs && openssl req -newkey rsa:4096 -nodes -sha256 -keyout certs/domain.key -x509 -days 365 -out certs/domain.crt
 Generating a 4096 bit RSA private key Generating a 4096 bit RSA private key
 ............................................................++ ............................................................++
Ligne 536: Ligne 394:
 root@registry:/# ls certs/ root@registry:/# ls certs/
 domain.crt  domain.key domain.crt  domain.key
-</code> 
- 
-Supprimez le conteneur **registry** : 
- 
-<code> 
-root@registry:/# docker rm registry 
-registry 
 </code> </code>
  
Ligne 555: Ligne 406:
 CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS                        PORTS                    NAMES CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS                        PORTS                    NAMES
 943c01b67cf3        registry:2.0        "registry cmd/regi..."   31 seconds ago      Up 24 seconds                 0.0.0.0:5000->5000/tcp   registry 943c01b67cf3        registry:2.0        "registry cmd/regi..."   31 seconds ago      Up 24 seconds                 0.0.0.0:5000->5000/tcp   registry
-ea239635e141        testcache           "more /tmp/moment"       40 minutes ago      Exited (0) 40 minutes ago                              test1 +</code> 
-21b0490a93dd        i2tch/mydocker      "/entrypoint.sh my...  About an hour ago   Exited (137) 18 minutes ago                            myDocker + 
-b9773e4aa06d        i2tch/mongodb2      "docker-entrypoint...  hours ago         Exited (0) 18 minutes ago                              mongo2 +Envoyez une copie du fichier **/certs/domain.crt** vers le répertoire /tmp de la machine virtuelle **Debian_9** en le renommant **ca.crt** : 
-bdb4bc0f81de        i2tch/mongodb1      "docker-entrypoint...  12 hours ago        Created                       27017/tcp                mongo1 + 
-f5b45072b831        i2tch/mongodb       "bash"                   13 hours ago        Exited (13718 minutes ago                            mongo +<code> 
-9731a48f126a        nginx               "nginx -g 'daemon ...  13 hours ago        Exited (018 minutes ago                              cocky_gates +root@debian91:~# scp /certs/domain.crt trainee@10.0.2.60:/tmp/ca.crt 
-eacd70596e23        nginx               "nginx -g 'daemon ...  13 hours ago        Exited (0) 13 hours ago                                adoring_yonath +The authenticity of host '10.0.2.60 (10.0.2.60)' can't be established
-cffb4456e9c4        ubuntu              "/bin/bash"              14 hours ago        Exited (0) 14 hours ago                                i2tch+ECDSA key fingerprint is 79:00:60:0e:2b:71:5e:cb:1a:08:45:e8:ab:45:b8:dd. 
 +Are you sure you want to continue connecting (yes/no)? yes 
 +Warning: Permanently added '10.0.2.60' (ECDSAto the list of known hosts. 
 +trainee@10.0.2.60's password: trainee 
 +domain.crt                                                                                                                            100% 2017     2.0KB/s   00:00  
 </code> </code>
  
 ===Configurer le Client=== ===Configurer le Client===
 +
 +Sortez de la VM **debian91** et connectez-vous à la VM debian9 :
 +
 +<code>
 +trainee@traineeXX:~$ ssh -l trainee 10.0.2.60
 +</code>
 +
 +Passez en tant que **root** :
 +
 +<code>
 +trainee@debian9:~$ su -
 +Mot de passe : fenestros
 +root@debian9:~#
 +</code>
  
 Supprimez le conteneur **registry** : Supprimez le conteneur **registry** :
Ligne 573: Ligne 442:
 CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS                     PORTS               NAMES CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS                     PORTS               NAMES
 c4c7cad999cd        registry:2.0        "registry cmd/regi..."   4 hours ago         Exited (2) 4 hours ago                         registry c4c7cad999cd        registry:2.0        "registry cmd/regi..."   4 hours ago         Exited (2) 4 hours ago                         registry
-ea239635e141        testcache           "more /tmp/moment"       4 hours ago         Exited (0) 4 hours ago                         test1 
 21b0490a93dd        i2tch/mydocker      "/entrypoint.sh my..."   4 hours ago         Exited (137) 4 hours ago                       myDocker 21b0490a93dd        i2tch/mydocker      "/entrypoint.sh my..."   4 hours ago         Exited (137) 4 hours ago                       myDocker
-b9773e4aa06d        i2tch/mongodb2      "docker-entrypoint..."   5 hours ago         Exited (0) 4 hours ago                         mongo2 +
-bdb4bc0f81de        i2tch/mongodb1      "docker-entrypoint..."   16 hours ago        Created                    27017/tcp           mongo1 +
-f5b45072b831        i2tch/mongodb       "bash"                   16 hours ago        Exited (137) 4 hours ago                       mongo +
-9731a48f126a        nginx               "nginx -g 'daemon ..."   16 hours ago        Exited (0) 4 hours ago                         cocky_gates +
-eacd70596e23        nginx               "nginx -g 'daemon ..."   17 hours ago        Exited (0) 17 hours ago                        adoring_yonath +
-cffb4456e9c4        ubuntu              "/bin/bash"              17 hours ago        Exited (0) 17 hours ago                        i2tch+
 root@debian9:~# docker rm registry root@debian9:~# docker rm registry
 registry registry
 +
 root@debian9:~# docker ps -a root@debian9:~# docker ps -a
 CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS                     PORTS               NAMES CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS                     PORTS               NAMES
-ea239635e141        testcache           "more /tmp/moment"       4 hours ago         Exited (0) 4 hours ago                         test1 
 21b0490a93dd        i2tch/mydocker      "/entrypoint.sh my..."   4 hours ago         Exited (137) 4 hours ago                       myDocker 21b0490a93dd        i2tch/mydocker      "/entrypoint.sh my..."   4 hours ago         Exited (137) 4 hours ago                       myDocker
-b9773e4aa06d        i2tch/mongodb2      "docker-entrypoint..."   5 hours ago         Exited (0) 4 hours ago                         mongo2 
-bdb4bc0f81de        i2tch/mongodb1      "docker-entrypoint..."   16 hours ago        Created                    27017/tcp           mongo1 
-f5b45072b831        i2tch/mongodb       "bash"                   16 hours ago        Exited (137) 4 hours ago                       mongo 
-9731a48f126a        nginx               "nginx -g 'daemon ..."   16 hours ago        Exited (0) 4 hours ago                         cocky_gates 
-eacd70596e23        nginx               "nginx -g 'daemon ..."   17 hours ago        Exited (0) 17 hours ago                        adoring_yonath 
-cffb4456e9c4        ubuntu              "/bin/bash"              17 hours ago        Exited (0) 17 hours ago                        i2tch 
 </code> </code>
  
Ligne 598: Ligne 455:
  
 <code> <code>
-root@debian9:~# docker images 
-REPOSITORY              TAG                 IMAGE ID            CREATED             SIZE 
-testcache               latest              c3b03bddaaad        4 hours ago         120MB 
-<none>                  <none>              1df8c3603628        4 hours ago         120MB 
-i2tch/mydocker          latest              c37edbd43993        5 hours ago         193MB 
-localhost:88/mydocker   latest              c37edbd43993        5 hours ago         193MB 
-<none>                  <none>              d6b51963df8d        5 hours ago         193MB 
-i2tch/mongodb2          latest              65e81f78c0f5        16 hours ago        240MB 
-i2tch/mongodb1          latest              2de862819e94        16 hours ago        240MB 
-i2tch/mongodb           latest              01c4aa152be2        16 hours ago        1.04GB 
-ubuntu                  latest              ccc7a11d65b1        3 weeks ago         120MB 
-centos                  latest              328edcd84f1b        4 weeks ago         193MB 
-nginx                   latest              b8efb18f159b        6 weeks ago         107MB 
-debian                  wheezy-slim         884ca0b949e5        6 weeks ago         46.9MB 
-hello-world             latest              1815c82652c0        2 months ago        1.84kB 
-registry                2.0                 3bccd459597f        2 years ago         549MB 
- 
 root@debian9:~# docker rmi registry:2.0 root@debian9:~# docker rmi registry:2.0
 Untagged: registry:2.0 Untagged: registry:2.0
Ligne 644: Ligne 484:
 root@debian9:~# docker images root@debian9:~# docker images
 REPOSITORY              TAG                 IMAGE ID            CREATED             SIZE REPOSITORY              TAG                 IMAGE ID            CREATED             SIZE
-testcache               latest              c3b03bddaaad        4 hours ago         120MB 
-<none>                  <none>              1df8c3603628        4 hours ago         120MB 
 i2tch/mydocker          latest              c37edbd43993        5 hours ago         193MB i2tch/mydocker          latest              c37edbd43993        5 hours ago         193MB
 localhost:88/mydocker   latest              c37edbd43993        5 hours ago         193MB localhost:88/mydocker   latest              c37edbd43993        5 hours ago         193MB
-<none>                  <none>              d6b51963df8d        5 hours ago         193MB 
-i2tch/mongodb2          latest              65e81f78c0f5        16 hours ago        240MB 
-i2tch/mongodb1          latest              2de862819e94        16 hours ago        240MB 
-i2tch/mongodb           latest              01c4aa152be2        16 hours ago        1.04GB 
-ubuntu                  latest              ccc7a11d65b1        3 weeks ago         120MB 
-centos                  latest              328edcd84f1b        4 weeks ago         193MB 
-nginx                   latest              b8efb18f159b        6 weeks ago         107MB 
-debian                  wheezy-slim         884ca0b949e5        6 weeks ago         46.9MB 
-hello-world             latest              1815c82652c0        2 months ago        1.84kB 
 </code> </code>
  
Ligne 665: Ligne 494:
 root@debian9:~# docker images root@debian9:~# docker images
 REPOSITORY                 TAG                 IMAGE ID            CREATED             SIZE REPOSITORY                 TAG                 IMAGE ID            CREATED             SIZE
-testcache                  latest              c3b03bddaaad        4 hours ago         120MB 
-<none>                     <none>              1df8c3603628        4 hours ago         120MB 
 i2tch/mydocker             latest              c37edbd43993        5 hours ago         193MB i2tch/mydocker             latest              c37edbd43993        5 hours ago         193MB
 localhost:88/mydocker      latest              c37edbd43993        5 hours ago         193MB localhost:88/mydocker      latest              c37edbd43993        5 hours ago         193MB
 myregistry:5000/mydocker   latest              c37edbd43993        5 hours ago         193MB myregistry:5000/mydocker   latest              c37edbd43993        5 hours ago         193MB
-<none>                     <none>              d6b51963df8d        5 hours ago         193MB 
-i2tch/mongodb2             latest              65e81f78c0f5        16 hours ago        240MB 
-i2tch/mongodb1             latest              2de862819e94        16 hours ago        240MB 
-i2tch/mongodb              latest              01c4aa152be2        16 hours ago        1.04GB 
-ubuntu                     latest              ccc7a11d65b1        3 weeks ago         120MB 
-centos                     latest              328edcd84f1b        4 weeks ago         193MB 
-nginx                      latest              b8efb18f159b        6 weeks ago         107MB 
-debian                     wheezy-slim         884ca0b949e5        6 weeks ago         46.9MB 
-hello-world                latest              1815c82652c0        2 months ago        1.84kB 
 </code> </code>
  
-Éditez le fichier **/etc/hosts** afin de pointer le 10.0.2.vers le nom **myregistry** :+Editez le fichier **/etc/hosts** afin de pointer le 10.0.2.61 vers le nom **myregistry** :
  
 <code> <code>
Ligne 687: Ligne 505:
 root@debian9:~# cat /etc/hosts root@debian9:~# cat /etc/hosts
 127.0.0.1 localhost 127.0.0.1 localhost
-127.0.1.1 debian9.i2tch.loc   debian9 +10.0.2.60 debian9.i2tch.loc debian9 
-10.0.2.4 myregistry.i2tch.loc    myregistry +10.0.2.61 myregistry.i2tch.loc    myregistry 
-10.0.2.15   debian9.i2tch.loc       debian9+10.0.2.62 manager.i2tch.loc manager 
 +10.0.2.63 worker1.i2tch.loc worker1 
 +10.0.2.64 worker2.i2tch.loc worker2
  
 # The following lines are desirable for IPv6 capable hosts # The following lines are desirable for IPv6 capable hosts
Ligne 697: Ligne 517:
 </code> </code>
  
-De la machine virtuelle **registry** envoyez une copie du fichier **/certs/domain.crt** vers le répertoire /tmp de la machine virtuelle **Debian_9** en le renommant **ca.crt** : +Déplacez le fichier **/tmp/ca.crt** vers le répertoire **/etc/docker/certs.d/myregistry:5000/** :
- +
-<code> +
-root@registry:~# scp /certs/domain.crt trainee@10.0.2.15:/tmp/ca.crt +
-The authenticity of host '10.0.2.15 (10.0.2.15)' can't be established. +
-ECDSA key fingerprint is 79:00:60:0e:2b:71:5e:cb:1a:08:45:e8:ab:45:b8:dd. +
-Are you sure you want to continue connecting (yes/no)? yes +
-Warning: Permanently added '10.0.2.15' (ECDSA) to the list of known hosts. +
-trainee@10.0.2.15's password:  +
-domain.crt                                                                                                                            100% 2017     2.0KB/  00:00   +
-</code> +
- +
-Dans la machine virtuelle **Debian_9**, déplacez le fichier **/tmp/ca.crt** vers le répertoire **/etc/docker/certs.d/myregistry:5000/** :+
  
 <code> <code>
Ligne 734: Ligne 542:
  
 ----- -----
-<html> + 
-<div align="center"> +Copyright © 2022 Hugh Norris.
-Copyright © 2020 Hugh NORRIS +
-</div> +
-</html>+
Menu