четвер, 12 травня 2016 р.

Тестуємо чи правильно встановлений докер

Якщо докер встановлений і його сервер запущений, то, перш ніж рухатися
далі, варто протестувати чи все працює вірно. Для цього запустимо
наступну команду:
 
$ docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
535020c3e8ad: Pull complete
af340544ed62: Pull complete
Digest: sha256:a68868bfe696c00866942e8f5ca39e3e31b79c1e50feaee4ce5e28df2f051d5c
Status: Downloaded newer image for hello-world:latest

Hello from Docker.
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
 1. The Docker Engine CLI client contacted the Docker Engine daemon.
 2. The Docker Engine daemon pulled the "hello-world" image from the Docker Hub.
 3. The Docker Engine daemon created a new container from that image which runs the
    executable that produces the output you are currently reading.
 4. The Docker Engine daemon streamed that output to the Docker Engine CLI client, which sent it
    to your terminal.

To try something more ambitious, you can run an Ubuntu container with:
 $ docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker Hub account:
 https://hub.docker.com

For more examples and ideas, visit:
 https://docs.docker.com/userguide/

Якщо Ви отримали приблизно такий самий вивід, то (чудово!) докер
працює вірно! Отже, можна переходити до наступних дослідів.

В наступних статтях я буду покладатися на те, що у Вас немає жодного
образу чи контейнера. Щойно виконана команда `docker run hello-world`,
встановила один образ та контейнер, давайте спершу витремо їх для
того, щоб перейти далі?

Просто виконайте наступні дві команди:
 
$ docker rm $(docker ps -aq)
5bcdf1d4ac27

$ docker rmi $(docker images -q)
Untagged: hello-world:latest
Deleted: sha256:94df4f0ce8a4d4d4c030b9bdfe91fc9cf6a4b7be914542315ef93a046d520614
Deleted: sha256:92953e7618fbb0f7991146fccf4da3dc31e1b5104b6d6c9572ee75d3eba240a2
Deleted: sha256:33e7801ac047e45517f22927037407c9753aa27ed72a5932c3e0886477041b12

Немає коментарів:

Дописати коментар