No one sees the real me

仮想化PF基盤SE

Docker インストール動確 (あまり興味ない)

Dockerインストール

[root@docker-base ~]# rpm -qa | grep docker
[root@docker-base ~]# 
[root@docker-base ~]# curl https://get.docker.com > /tmp/install.sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0  0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0  0     0    0     0    0     0      0      0 --:--:--  0:00:02 --:--:--     0  0     0    0     0    0     0      0      0 --:--:--  0:00:02 --:--:--     0100 13070  100 13070    0     0   4395      0  0:00:02  0:00:02 --:--:--  4394
[root@docker-base ~]# 
[root@docker-base ~]# 
[root@docker-base ~]# ls -l /tmp
合計 28
-rw-r--r--. 1 root root  2079  328 23:29 _cafenv-appconfig_
-rw-r--r--. 1 root root 13070  328 23:38 install.sh
-rwx------. 1 root root   836 1212 02:20 ks-script-cdWNAz
drwx------. 3 root root    17 1212 02:47 systemd-private-42734d56fac844a1a90d2a1dbe29c021-chronyd.service-zgpyje
drwx------. 3 root root    17  328 23:29 systemd-private-96d353623e364881ab357ecaccd0b993-chronyd.service-ZwFNT8
drwx------. 3 root root    17 1222 01:06 systemd-private-ca8da127f0774de2b14ebe6c2c20e90d-chronyd.service-OSPhF0
drwxr-xr-x. 2 root root    39 1212 02:27 vmware-config-16318.0
drwxr-xr-x. 2 root root    31 1212 02:28 vmware-fonts-16318.0
drwx------. 2 root root  4096  328 23:29 vmware-root
drwxr-xr-x. 9 root root   145 1130  2017 vmware-tools-distrib
-rw-------. 1 root root     0 1212 02:13 yum.log
[root@docker-base ~]# 
[root@docker-base ~]# chmod +x /tmp/install.sh 
[root@docker-base ~]# 
[root@docker-base ~]# ls -l /tmp
合計 28
-rw-r--r--. 1 root root  2079  328 23:29 _cafenv-appconfig_
-rwxr-xr-x. 1 root root 13070  328 23:38 install.sh
-rwx------. 1 root root   836 1212 02:20 ks-script-cdWNAz
drwx------. 3 root root    17 1212 02:47 systemd-private-42734d56fac844a1a90d2a1dbe29c021-chronyd.service-zgpyje
drwx------. 3 root root    17  328 23:29 systemd-private-96d353623e364881ab357ecaccd0b993-chronyd.service-ZwFNT8
drwx------. 3 root root    17 1222 01:06 systemd-private-ca8da127f0774de2b14ebe6c2c20e90d-chronyd.service-OSPhF0
drwxr-xr-x. 2 root root    39 1212 02:27 vmware-config-16318.0
drwxr-xr-x. 2 root root    31 1212 02:28 vmware-fonts-16318.0
drwx------. 2 root root  4096  328 23:29 vmware-root
drwxr-xr-x. 9 root root   145 1130  2017 vmware-tools-distrib
-rw-------. 1 root root     0 1212 02:13 yum.log
[root@docker-base ~]# 
[root@docker-base ~]# 
[root@docker-base ~]# /tmp/install.sh 
# Executing docker install script, commit: cfba462
+ sh -c 'yum install -y -q yum-utils'
警告: RPMDB は yum 以外で変更されました。
+ sh -c 'yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo'
読み込んだプラグイン:fastestmirror
adding repo from: https://download.docker.com/linux/centos/docker-ce.repo
grabbing file https://download.docker.com/linux/centos/docker-ce.repo to /etc/yum.repos.d/docker-ce.repo
repo saved to /etc/yum.repos.d/docker-ce.repo
+ '[' stable '!=' stable ']'
+ sh -c 'yum makecache'
読み込んだプラグイン:fastestmirror
Loading mirror speeds from cached hostfile
epel/x86_64/metalink                                     | 6.4 kB     00:00     
 * base: ftp.riken.jp
 * epel: ftp.riken.jp
 * extras: ftp.riken.jp
 * updates: ftp.riken.jp
base                                                     | 3.6 kB     00:00     
docker-ce-stable                                         | 3.5 kB     00:00     
extras                                                   | 3.4 kB     00:00     
updates                                                  | 3.4 kB     00:00     
(2/15): base/7/x86_64/othe 0% [                 ]  0.0 B/s |    0 B   --:-- ETA (2/15): base/7/x86_64/othe 2% [                 ]  0.0 B/s | 674 kB   --:-- ETA (2/15): base/7/x86_64/othe 10% [=-              ] 3.6 MB/s | 2.9 MB   00:06 ETA (2/15): base/7/x86_64/othe 16% [==-             ] 3.7 MB/s | 4.7 MB   00:06 ETA (3/15): docker-ce-stable/x 23% [===-            ] 3.9 MB/s | 6.5 MB   00:05 ETA (1/15): base/7/x86_64/filelists_db                         | 7.1 MB   00:04     
(4/15): docker-ce-stable/x 33% [=====           ] 4.1 MB/s | 9.3 MB   00:04 ETA (2/15): base/7/x86_64/other_db                             | 2.6 MB   00:04     
(3/15): docker-ce-stable/x 34% [=====-          ] 3.7 MB/s | 9.7 MB   00:04 ETA (3/15): docker-ce-stable/x86_64/updateinfo                 |   55 B   00:04     
(4/15): docker-ce-stable/x86_64/primary_db                 |  26 kB   00:00     
(5/15): docker-ce-stable/x86_64/other_db                   | 110 kB   00:00     
(6/15): docker-ce-stable/x 38% [======          ] 3.5 MB/s |  11 MB   00:04 ETA (7/15): epel/x86_64/fileli 42% [======-         ] 3.1 MB/s |  12 MB   00:05 ETA (7/15): epel/x86_64/fileli 53% [========-       ] 3.6 MB/s |  15 MB   00:03 ETA (6/15): docker-ce-stable/x86_64/filelists_db               |  13 kB   00:06     
(8/15): epel/x86_64/presto 58% [=========       ] 3.6 MB/s |  16 MB   00:03 ETA (8/15): epel/x86_64/presto 63% [==========      ] 3.7 MB/s |  18 MB   00:02 ETA (7/15): epel/x86_64/fileli 67% [==========-     ] 3.7 MB/s |  19 MB   00:02 ETA (7/15): epel/x86_64/fileli 72% [===========-    ] 3.7 MB/s |  20 MB   00:02 ETA (7/15): epel/x86_64/filelists_db                           |  11 MB   00:03     
(8/15): epel/x86_64/prestodelta                            |  981 B   00:03     
(9/15): epel/x86_64/other_ 81% [=============   ] 3.8 MB/s |  23 MB   00:01 ETA (9/15): extras/7/x86_64/prestodelta                        |  52 kB   00:00     
(11/15): extras/7/x86_64/f 85% [=============-  ] 3.8 MB/s |  24 MB   00:01 ETA (10/15): epel/x86_64/other_db                              | 3.2 MB   00:00     
(11/15): updates/7/x86_64/other_db                         | 456 kB   00:00     
(13/15): extras/7/x86_64/o 88% [==============  ] 3.7 MB/s |  25 MB   00:00 ETA (12/15): updates/7/x86_64/prestodelta                      | 477 kB   00:00     
(15/15): updates/7/x86_64/ 89% [==============  ] 2.5 MB/s |  25 MB   00:01 ETA (13/15): extras/7/x86_64/other_db                          | 120 kB   00:02     
(14/15): extras/7/x86_64/filelists_db                      | 235 kB   00:02     
(15/15): updates/7/x86_64/ 90% [==============  ] 1.5 MB/s |  25 MB   00:01 ETA (15/15): updates/7/x86_64/ 92% [==============- ] 1.5 MB/s |  26 MB   00:01 ETA (15/15): updates/7/x86_64/ 97% [===============-] 1.7 MB/s |  27 MB   00:00 ETA (15/15): updates/7/x86_64/filelists_db                     | 2.6 MB   00:05     
メタデータのキャッシュを作成しました
+ sh -c 'yum install -y -q docker-ce'
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
warning: /var/cache/yum/x86_64/7/docker-ce-stable/packages/containerd.io-1.2.5-3.1.el7.x86_64.rpm: Header V4 RSA/SHA512 Signature, key ID 621e9f35: NOKEY
containerd.io-1.2.5-3.1.el7.x86_64.rpm の公開鍵がインストールされていません
Importing GPG key 0x621E9F35:
 Userid     : "Docker Release (CE rpm) <docker@docker.com>"
 Fingerprint: 060a 61c5 1b55 8a7f 742b 77aa c52f eb6b 621e 9f35
 From       : https://download.docker.com/linux/centos/gpg
If you would like to use Docker as a non-root user, you should now consider
adding your user to the "docker" group with something like:

  sudo usermod -aG docker your-user

Remember that you will have to log out and back in for this to take effect!

WARNING: Adding a user to the "docker" group will grant the ability to run
         containers which can be used to obtain root privileges on the
         docker host.
         Refer to https://docs.docker.com/engine/security/security/#docker-daemon-attack-surface
         for more information.

** DOCKER ENGINE - ENTERPRISE **

If you’re ready for production workloads, Docker Engine - Enterprise also includes:

  * SLA-backed technical support
  * Extended lifecycle maintenance policy for patches and hotfixes
  * Access to certified ecosystem content

** Learn more at https://dockr.ly/engine2 **

ACTIVATE your own engine to Docker Engine - Enterprise using:

  sudo docker engine activate

[root@docker-base ~]# 
[root@docker-base ~]# 
[root@docker-base ~]# rpm -qa | grep docker
docker-ce-cli-18.09.4-3.el7.x86_64
docker-ce-18.09.4-3.el7.x86_64
[root@docker-base ~]# 
[root@docker-base ~]# 
[root@docker-base ~]# which docker
/usr/bin/docker
[root@docker-base ~]# 

[root@docker-base ~]# systemctl start docker
[root@docker-base ~]# 
[root@docker-base ~]# systemctl status docker 
● docker.service - Docker Application Container Engine
   Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
   Active: active (running) since 木 2019-03-28 23:46:19 JST; 9s ago
     Docs: https://docs.docker.com
 Main PID: 7667 (dockerd)
    Tasks: 10
   Memory: 32.0M
   CGroup: /system.slice/docker.service
           mq7667 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/cont...

 328 23:46:18 docker-base dockerd[7667]: time="2019-03-28T23:46:18.11816...c
 3月 28 23:46:18 docker-base dockerd[7667]: time="2019-03-28T23:46:18.11835...c
 328 23:46:18 docker-base dockerd[7667]: time="2019-03-28T23:46:18.15833..."
 328 23:46:18 docker-base dockerd[7667]: time="2019-03-28T23:46:18.16035..."
 328 23:46:18 docker-base dockerd[7667]: time="2019-03-28T23:46:18.69867..."
 328 23:46:19 docker-base dockerd[7667]: time="2019-03-28T23:46:19.05211..."
 328 23:46:19 docker-base dockerd[7667]: time="2019-03-28T23:46:19.09513...4
 3月 28 23:46:19 docker-base dockerd[7667]: time="2019-03-28T23:46:19.09580..."
 3月 28 23:46:19 docker-base dockerd[7667]: time="2019-03-28T23:46:19.14785..."
 3月 28 23:46:19 docker-base systemd[1]: Started Docker Application Contain....
Hint: Some lines were ellipsized, use -l to show in full.
[root@docker-base ~]# 
[root@docker-base ~]# ps -ef | grep docker
root      7667     1  0 23:46 ?        00:00:00 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
root      7817  6979  0 23:47 pts/1    00:00:00 grep --color=auto docker
[root@docker-base ~]# 
[root@docker-base ~]# 




[root@docker-base ~]# docker --h
unknown flag: --h
See 'docker --help'.

Usage:    docker [OPTIONS] COMMAND

A self-sufficient runtime for containers

Options:
      --config string      Location of client config files (default
                           "/root/.docker")
  -D, --debug              Enable debug mode
  -H, --host list          Daemon socket(s) to connect to
  -l, --log-level string   Set the logging level
                           ("debug"|"info"|"warn"|"error"|"fatal")
                           (default "info")
      --tls                Use TLS; implied by --tlsverify
      --tlscacert string   Trust certs signed only by this CA (default
                           "/root/.docker/ca.pem")
      --tlscert string     Path to TLS certificate file (default
                           "/root/.docker/cert.pem")
      --tlskey string      Path to TLS key file (default
                           "/root/.docker/key.pem")
      --tlsverify          Use TLS and verify the remote
  -v, --version            Print version information and quit

Management Commands:
  builder     Manage builds
  checkpoint  Manage checkpoints
  config      Manage Docker configs
  container   Manage containers
  engine      Manage the docker engine
  image       Manage images
  manifest    Manage Docker image manifests and manifest lists
  network     Manage networks
  node        Manage Swarm nodes
  plugin      Manage plugins
  secret      Manage Docker secrets
  service     Manage services
  stack       Manage Docker stacks
  swarm       Manage Swarm
  system      Manage Docker
  trust       Manage trust on Docker images
  volume      Manage volumes

Commands:
  attach      Attach local standard input, output, and error streams to a running container
  build       Build an image from a Dockerfile
  commit      Create a new image from a container's changes
  cp          Copy files/folders between a container and the local filesystem
  create      Create a new container
  deploy      Deploy a new stack or update an existing stack
  diff        Inspect changes to files or directories on a container's filesystem
  events      Get real time events from the server
  exec        Run a command in a running container
  export      Export a container's filesystem as a tar archive
  history     Show the history of an image
  images      List images
  import      Import the contents from a tarball to create a filesystem image
  info        Display system-wide information
  inspect     Return low-level information on Docker objects
  kill        Kill one or more running containers
  load        Load an image from a tar archive or STDIN
  login       Log in to a Docker registry
  logout      Log out from a Docker registry
  logs        Fetch the logs of a container
  pause       Pause all processes within one or more containers
  port        List port mappings or a specific mapping for the container
  ps          List containers
  pull        Pull an image or a repository from a registry
  push        Push an image or a repository to a registry
  rename      Rename a container
  restart     Restart one or more containers
  rm          Remove one or more containers
  rmi         Remove one or more images
  run         Run a command in a new container
  save        Save one or more images to a tar archive (streamed to STDOUT by default)
  search      Search the Docker Hub for images
  start       Start one or more stopped containers
  stats       Display a live stream of container(s) resource usage statistics
  stop        Stop one or more running containers
  tag         Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE
  top         Display the running processes of a container
  unpause     Unpause all processes within one or more containers
  update      Update configuration of one or more containers
  version     Show the Docker version information
  wait        Block until one or more containers stop, then print their exit codes

Run 'docker COMMAND --help' for more information on a command.

動確

[root@docker-base ~]# 
[root@docker-base ~]# 
[root@docker-base ~]# docker container run centos:7 echo "hello world"
Unable to find image 'centos:7' locally
7: Pulling from library/centos

8ba884070f61: Pulling fs layer 8ba884070f61: Downloading  539.3kB/75.4MB8ba884070f61: Downloading  1.621MB/75.4MB8ba884070f61: Downloading  2.702MB/75.4MB8ba884070f61: Downloading  3.783MB/75.4MB8ba884070f61: Downloading  4.865MB/75.4MB8ba884070f61: Downloading  5.946MB/75.4MB8ba884070f61: Downloading  6.483MB/75.4MB8ba884070f61: Downloading  7.011MB/75.4MB8ba884070f61: Downloading  8.092MB/75.4MB8ba884070f61: Downloading  9.174MB/75.4MB8ba884070f61: Downloading  10.24MB/75.4MB8ba884070f61: Downloading  11.31MB/75.4MB8ba884070f61: Downloading  11.85MB/75.4MB8ba884070f61: Downloading  12.38MB/75.4MB8ba884070f61: Downloading  12.93MB/75.4MB8ba884070f61: Downloading  13.47MB/75.4MB8ba884070f61: Downloading  14.01MB/75.4MB8ba884070f61: Downloading  14.55MB/75.4MB8ba884070f61: Downloading  15.09MB/75.4MB8ba884070f61: Downloading  15.62MB/75.4MB8ba884070f61: Downloading  16.15MB/75.4MB8ba884070f61: Downloading  16.69MB/75.4MB8ba884070f61: Downloading  17.76MB/75.4MB8ba884070f61: Downloading   18.3MB/75.4MB8ba884070f61: Downloading  18.84MB/75.4MB8ba884070f61: Downloading  19.91MB/75.4MB8ba884070f61: Downloading  20.45MB/75.4MB8ba884070f61: Downloading  21.52MB/75.4MB8ba884070f61: Downloading  22.59MB/75.4MB8ba884070f61: Downloading  23.66MB/75.4MB8ba884070f61: Downloading   24.2MB/75.4MB8ba884070f61: Downloading  24.74MB/75.4MB8ba884070f61: Downloading  25.82MB/75.4MB8ba884070f61: Downloading  26.36MB/75.4MB8ba884070f61: Downloading  26.91MB/75.4MB8ba884070f61: Downloading  27.45MB/75.4MB8ba884070f61: Downloading  27.99MB/75.4MB8ba884070f61: Downloading  28.52MB/75.4MB8ba884070f61: Downloading  29.06MB/75.4MB8ba884070f61: Downloading   29.6MB/75.4MB8ba884070f61: Downloading  30.14MB/75.4MB8ba884070f61: Downloading  30.67MB/75.4MB8ba884070f61: Downloading  31.19MB/75.4MB8ba884070f61: Downloading  31.73MB/75.4MB8ba884070f61: Downloading  32.26MB/75.4MB8ba884070f61: Downloading   32.8MB/75.4MB8ba884070f61: Downloading  33.86MB/75.4MB8ba884070f61: Downloading  34.93MB/75.4MB8ba884070f61: Downloading  36.01MB/75.4MB8ba884070f61: Downloading  37.07MB/75.4MB8ba884070f61: Downloading  38.15MB/75.4MB8ba884070f61: Downloading  39.22MB/75.4MB8ba884070f61: Downloading  39.75MB/75.4MB8ba884070f61: Downloading  40.28MB/75.4MB8ba884070f61: Downloading  40.82MB/75.4MB8ba884070f61: Downloading  41.89MB/75.4MB8ba884070f61: Downloading  42.43MB/75.4MB8ba884070f61: Downloading   43.5MB/75.4MB8ba884070f61: Downloading  44.57MB/75.4MB8ba884070f61: Downloading  45.64MB/75.4MB8ba884070f61: Downloading  46.18MB/75.4MB8ba884070f61: Downloading  46.71MB/75.4MB8ba884070f61: Downloading  47.77MB/75.4MB8ba884070f61: Downloading  48.32MB/75.4MB8ba884070f61: Downloading  48.86MB/75.4MB8ba884070f61: Downloading  49.92MB/75.4MB8ba884070f61: Downloading  50.99MB/75.4MB8ba884070f61: Downloading  52.07MB/75.4MB8ba884070f61: Downloading  53.14MB/75.4MB8ba884070f61: Downloading  53.68MB/75.4MB8ba884070f61: Downloading  54.75MB/75.4MB8ba884070f61: Downloading  55.28MB/75.4MB8ba884070f61: Downloading  56.36MB/75.4MB8ba884070f61: Downloading   56.9MB/75.4MB8ba884070f61: Downloading  57.44MB/75.4MB8ba884070f61: Downloading  57.97MB/75.4MB8ba884070f61: Downloading  58.51MB/75.4MB8ba884070f61: Downloading  59.56MB/75.4MB8ba884070f61: Downloading  60.64MB/75.4MB8ba884070f61: Downloading  61.72MB/75.4MB8ba884070f61: Downloading  62.78MB/75.4MB8ba884070f61: Downloading  63.86MB/75.4MB8ba884070f61: Downloading  64.94MB/75.4MB8ba884070f61: Downloading  66.01MB/75.4MB8ba884070f61: Downloading  67.09MB/75.4MB8ba884070f61: Downloading  67.63MB/75.4MB8ba884070f61: Downloading  68.16MB/75.4MB8ba884070f61: Downloading  69.23MB/75.4MB8ba884070f61: Downloading  69.76MB/75.4MB8ba884070f61: Downloading  70.82MB/75.4MB8ba884070f61: Downloading  71.36MB/75.4MB8ba884070f61: Downloading  71.89MB/75.4MB8ba884070f61: Downloading  72.43MB/75.4MB8ba884070f61: Downloading  72.97MB/75.4MB8ba884070f61: Downloading  73.51MB/75.4MB8ba884070f61: Downloading  74.59MB/75.4MB8ba884070f61: Verifying Checksum 8ba884070f61: Download complete 8ba884070f61: Extracting  557.1kB/75.4MB8ba884070f61: Extracting  1.671MB/75.4MB8ba884070f61: Extracting  2.785MB/75.4MB8ba884070f61: Extracting  3.899MB/75.4MB8ba884070f61: Extracting  5.014MB/75.4MB8ba884070f61: Extracting  6.128MB/75.4MB8ba884070f61: Extracting  7.242MB/75.4MB8ba884070f61: Extracting  8.356MB/75.4MB8ba884070f61: Extracting   9.47MB/75.4MB8ba884070f61: Extracting  10.58MB/75.4MB8ba884070f61: Extracting   11.7MB/75.4MB8ba884070f61: Extracting  12.81MB/75.4MB8ba884070f61: Extracting  13.93MB/75.4MB8ba884070f61: Extracting  15.04MB/75.4MB8ba884070f61: Extracting  16.15MB/75.4MB8ba884070f61: Extracting  17.27MB/75.4MB8ba884070f61: Extracting  18.38MB/75.4MB8ba884070f61: Extracting  18.94MB/75.4MB8ba884070f61: Extracting  20.05MB/75.4MB8ba884070f61: Extracting  21.17MB/75.4MB8ba884070f61: Extracting  22.28MB/75.4MB8ba884070f61: Extracting   23.4MB/75.4MB8ba884070f61: Extracting  24.51MB/75.4MB8ba884070f61: Extracting  25.62MB/75.4MB8ba884070f61: Extracting  26.18MB/75.4MB8ba884070f61: Extracting   27.3MB/75.4MB8ba884070f61: Extracting  28.41MB/75.4MB8ba884070f61: Extracting  29.52MB/75.4MB8ba884070f61: Extracting  30.64MB/75.4MB8ba884070f61: Extracting  32.31MB/75.4MB8ba884070f61: Extracting  33.42MB/75.4MB8ba884070f61: Extracting  34.54MB/75.4MB8ba884070f61: Extracting  35.65MB/75.4MB8ba884070f61: Extracting  36.77MB/75.4MB8ba884070f61: Extracting  37.88MB/75.4MB8ba884070f61: Extracting  38.99MB/75.4MB8ba884070f61: Extracting  40.11MB/75.4MB8ba884070f61: Extracting  41.22MB/75.4MB8ba884070f61: Extracting  42.34MB/75.4MB8ba884070f61: Extracting  43.45MB/75.4MB8ba884070f61: Extracting  44.56MB/75.4MB8ba884070f61: Extracting  45.68MB/75.4MB8ba884070f61: Extracting  46.79MB/75.4MB8ba884070f61: Extracting  47.35MB/75.4MB8ba884070f61: Extracting  48.46MB/75.4MB8ba884070f61: Extracting  49.02MB/75.4MB8ba884070f61: Extracting  49.58MB/75.4MB8ba884070f61: Extracting  50.69MB/75.4MB8ba884070f61: Extracting  51.81MB/75.4MB8ba884070f61: Extracting  52.92MB/75.4MB8ba884070f61: Extracting  54.03MB/75.4MB8ba884070f61: Extracting  54.59MB/75.4MB8ba884070f61: Extracting  55.71MB/75.4MB8ba884070f61: Extracting  56.82MB/75.4MB8ba884070f61: Extracting  57.93MB/75.4MB8ba884070f61: Extracting  59.05MB/75.4MB8ba884070f61: Extracting  60.16MB/75.4MB8ba884070f61: Extracting  61.28MB/75.4MB8ba884070f61: Extracting  62.95MB/75.4MB8ba884070f61: Extracting  64.06MB/75.4MB8ba884070f61: Extracting  65.18MB/75.4MB8ba884070f61: Extracting  65.73MB/75.4MB8ba884070f61: Extracting  66.85MB/75.4MB8ba884070f61: Extracting   67.4MB/75.4MB8ba884070f61: Extracting  67.96MB/75.4MB8ba884070f61: Extracting  69.07MB/75.4MB8ba884070f61: Extracting  69.63MB/75.4MB8ba884070f61: Extracting  70.75MB/75.4MB8ba884070f61: Extracting  71.86MB/75.4MB8ba884070f61: Extracting  72.97MB/75.4MB8ba884070f61: Extracting  74.09MB/75.4MB8ba884070f61: Extracting   75.2MB/75.4MB8ba884070f61: Extracting   75.4MB/75.4MB8ba884070f61: Pull complete Digest: sha256:8d487d68857f5bc9595793279b33d082b03713341ddec91054382641d14db861
Status: Downloaded newer image for centos:7
hello world
[root@docker-base ~]# 
[root@docker-base ~]# 
[root@docker-base ~]# docker container ls -a
CONTAINER ID        IMAGE               COMMAND                CREATED             STATUS                      PORTS               NAMES
7b0f8665a374        centos:7            "echo 'hello world'"   25 seconds ago      Exited (0) 25 seconds ago                       recursing_mahavira
[root@docker-base ~]# 
[root@docker-base ~]# 
[root@docker-base ~]# 
[root@docker-base ~]# 
[root@docker-base ~]# docker container ls -a
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
[root@docker-base ~]# 
[root@docker-base ~]# 
[root@docker-base ~]# docker container run -d it centos:7 ping 127.0.0.1
7a1a54860e33597926c8e64a2a9a63b9b0e6d43fc0c24fb9ab4cba3a470da2c6
[root@docker-base ~]# 
[root@docker-base ~]# 
[root@docker-base ~]# docker container ls
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
7a1a54860e33        centos:7            "ping 127.0.0.1"    13 seconds ago      Up 12 seconds                           agitated_keldysh
[root@docker-base ~]# 
[root@docker-base ~]# docker container ls -a
CONTAINER ID        IMAGE               COMMAND                CREATED             STATUS                     PORTS               NAMES
7a1a54860e33        centos:7            "ping 127.0.0.1"       20 seconds ago      Up 19 seconds                                  agitated_keldysh
7b0f8665a374        centos:7            "echo 'hello world'"   2 minutes ago       Exited (0) 2 minutes ago                       recursing_mahavira
[root@docker-base ~]# 
[root@docker-base ~]# ps -ef | grep 127.0
root      8075  8056  0 23:51 pts/0    00:00:00 ping 127.0.0.1
root      8129  6979  0 23:52 pts/1    00:00:00 grep --color=auto 127.0
[root@docker-base ~]# 
[root@docker-base ~]# docker container attach 7a1a54860e33597926c8e64a2a9a63b9b0 e6d43fc0c24fb9ab4cba3a470da2c6
64 bytes from 127.0.0.1: icmp_seq=119 ttl=64 time=0.058 ms
64 bytes from 127.0.0.1: icmp_seq=120 ttl=64 time=0.127 ms
64 bytes from 127.0.0.1: icmp_seq=121 ttl=64 time=0.125 ms
64 bytes from 127.0.0.1: icmp_seq=122 ttl=64 time=0.073 ms
64 bytes from 127.0.0.1: icmp_seq=123 ttl=64 time=0.130 ms
64 bytes from 127.0.0.1: icmp_seq=124 ttl=64 time=0.060 ms
64 bytes from 127.0.0.1: icmp_seq=125 ttl=64 time=0.052 ms
64 bytes from 127.0.0.1: icmp_seq=126 ttl=64 time=0.076 ms
64 bytes from 127.0.0.1: icmp_seq=127 ttl=64 time=0.131 ms
64 bytes from 127.0.0.1: icmp_seq=128 ttl=64 time=0.123 ms
64 bytes from 127.0.0.1: icmp_seq=129 ttl=64 time=0.132 ms
64 bytes from 127.0.0.1: icmp_seq=130 ttl=64 time=0.202 ms
read escape sequence
[root@docker-base ~]# 
[root@docker-base ~]# 
[root@docker-base ~]# 
[root@docker-base ~]# docker container ls -a
CONTAINER ID        IMAGE               COMMAND                CREATED             STATUS                     PORTS               NAMES
7a1a54860e33        centos:7            "ping 127.0.0.1"       2 minutes ago       Up 2 minutes                                   agitated_keldysh
7b0f8665a374        centos:7            "echo 'hello world'"   4 minutes ago       Exited (0) 4 minutes ago                       recursing_mahavira
[root@docker-base ~]# 
[root@docker-base ~]# 
[root@docker-base ~]# 
[root@docker-base ~]# 
[root@docker-base ~]# 
[root@docker-base ~]# 
[root@docker-base ~]# docker container ls -aattach 7a1a54860e33597926c8e64a2a9a63b9b0ee6d43fc0c24fb9ab4cba3a470da2c6
64 bytes from 127.0.0.1: icmp_seq=168 ttl=64 time=0.050 ms
64 bytes from 127.0.0.1: icmp_seq=169 ttl=64 time=0.120 ms
64 bytes from 127.0.0.1: icmp_seq=170 ttl=64 time=0.053 ms
64 bytes from 127.0.0.1: icmp_seq=171 ttl=64 time=0.116 ms
64 bytes from 127.0.0.1: icmp_seq=172 ttl=64 time=0.122 ms
64 bytes from 127.0.0.1: icmp_seq=173 ttl=64 time=0.129 ms
^C
--- 127.0.0.1 ping statistics ---
173 packets transmitted, 173 received, 0% packet loss, time 172081ms
rtt min/avg/max/mdev = 0.044/0.106/1.786/0.136 ms
[root@docker-base ~]# 
[root@docker-base ~]# 
[root@docker-base ~]# 
[root@docker-base ~]# 
[root@docker-base ~]# docker container ls -a
CONTAINER ID        IMAGE               COMMAND                CREATED             STATUS                     PORTS               NAMES
7a1a54860e33        centos:7            "ping 127.0.0.1"       2 minutes ago       Exited (0) 4 seconds ago                       agitated_keldysh
7b0f8665a374        centos:7            "echo 'hello world'"   4 minutes ago       Exited (0) 4 minutes ago                       recursing_mahavira
[root@docker-base ~]# 
[root@docker-base ~]# 
[root@docker-base ~]# docker container ls -a
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
[root@docker-base ~]# 
[root@docker-base ~]# 
[root@docker-base ~]# ps -ef | grep 127.0
root      8269  6979  0 23:55 pts/1    00:00:00 grep --color=auto 127.0
[root@docker-base ~]# 
[root@docker-base ~]# 


[root@docker-base ~]# docker image ls
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
centos              7                   9f38484d220f        13 days ago         202MB
[root@docker-base ~]# 
[root@docker-base ~]# docker container ls
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
[root@docker-base ~]# 
[root@docker-base ~]# docker container ls -a
CONTAINER ID        IMAGE               COMMAND                CREATED             STATUS                     PORTS               NAMES
7a1a54860e33        centos:7            "ping 127.0.0.1"       4 minutes ago       Exited (0) 2 minutes ago                       agitated_keldysh
7b0f8665a374        centos:7            "echo 'hello world'"   6 minutes ago       Exited (0) 6 minutes ago                       recursing_mahavira
[root@docker-base ~]#