[root@i-k11xnd1o ~]# docker imagesREPOSITORY TAG IMAGE ID CREATED SIZEdocker.io/hello-world latest 1815c82652c0 5 weeks ago 1.84 kBdocker.io/blockchain101/ethereum-geth 1.6.5 1e23e07389b2 5 weeks ago 1.534 GB[root@i-k11xnd1o ~]# docker run --name hello hello-worldHello 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 client contacted the Docker daemon. 2. The Docker daemon pulled the "hello-world" image from the Docker Hub. 3. The Docker daemon created a new container from that image which runs the executable that produces the output you are currently reading. 4. The Docker daemon streamed that output to the Docker client, which sent it to your terminal.To try something more ambitious, you can run an Ubuntu container with: $ docker run -it ubuntu bashShare images, automate workflows, and more with a free Docker ID: https://cloud.docker.com/For more examples and ideas, visit: https://docs.docker.com/engine/userguide/[root@i-k11xnd1o ~]# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES[root@i-k11xnd1o ~]# docker ps -aCONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES4c7a7f772b51 hello-world "/hello" 22 seconds ago Exited (0) 21 seconds ago helloafffac98fb68 blockchain101/ethereum-geth:1.6.5 "bash -c './rungeth.s" 17 hours ago Exited (137) 16 hours ago geth-cluster092a18adb1acd blockchain101/ethereum-geth:1.6.5 "bash -c './checkboot" 17 hours ago Exited (137) 16 hours ago geth-cluster12efa9f365613 hello-world "/hello" 23 hours ago Exited (0) 23 hours ago furious_keller[root@i-k11xnd1o ~]# docker start afffac98fb68afffac98fb68[root@i-k11xnd1o ~]# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMESafffac98fb68 blockchain101/ethereum-geth:1.6.5 "bash -c './rungeth.s" 17 hours ago Up 7 seconds 0.0.0.0:8200-8210->8200-8210/tcp geth-cluster0
啟動容器以後就自動進去容器的目錄了
[root@i-k11xnd1o ~]#docker exec -it afffac98fb68 /bin/bashroot@afffac98fb68:/ethutil# lltotal 32drwxrwxrwx 2 root root 165 Jun 11 15:36 ./drwxr-xr-x 25 root root 322 Jul 20 02:31 ../-rwxrwxrwx 1 root root 88 Jun 11 07:00 checkbootnode.sh*-rwxrwxrwx 1 root root 1282 Jun 9 14:26 gethaccts.sh*-rwxrwxrwx 1 root root 2527 Jun 9 15:08 gethcluster.sh*-rwxrwxrwx 1 root root 2759 Jun 11 15:30 gethnodes.sh*-rwxrwxrwx 1 root root 3230 Jun 10 06:56 gethup.sh*-rwxrwxrwx 1 root root 200 Jun 9 14:26 killgeth.sh*-rwxrwxrwx 1 root root 45 Jun 9 14:26 nodeinfo.js*-rwxrwxrwx 1 root root 1415 Jun 11 15:34 rungeth.sh*