01/11/2022

3. Hello, World !

Lu 972 fois Licence Creative Commons

Terminal

Ouvrir un terminal et vérifier que le client Docker est bien installé en utilisant l'option -v pour afficher la version de Docker:

docker -v
[output]Docker version 20.10.21, build baeda1f

Note: pour les utilisateurs de Docker Toolbox, utiliser le terminal spécialement installé Docker QuickStart Terminal.
Conseil: utiliser la commande docker version pour obtenir plus d'informations sur les versions des différents composants de Docker.


Hello, World !

Pour vérifier son installation Docker, démarrer un conteneur se basant sur l'image hello-world. Si tout se passe bien, l'image est téléchargée et un message apparaît::

docker run hello-world
[output]Hello from Docker!
[output]This message shows that your installation appears to be working correctly.
[output]
[output]To generate this message, Docker took the following steps:
[output]1. The Docker client contacted the Docker daemon.
[output]2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
[output](amd64)
[output]3. The Docker daemon created a new container from that image which runs the
[output]executable that produces the output you are currently reading.
[output]4. The Docker daemon streamed that output to the Docker client, which sent it
[output]to your terminal.
[output]...