启动docker,进入docker

[root@i-k11xnd1o ~]# docker images
REPOSITORY                              TAG                 IMAGE ID            CREATED             SIZE
docker.io/hello-world                   latest              1815c82652c0        5 weeks ago         1.84 kB
docker.io/blockchain101/ethereum-geth   1.6.5               1e23e07389b2        5 weeks ago         1.534 GB
[root@i-k11xnd1o ~]# docker run --name hello hello-world

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 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 bash

Share 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 -a
CONTAINER ID        IMAGE                               COMMAND                  CREATED             STATUS                      PORTS               NAMES
4c7a7f772b51        hello-world                         "/hello"                 22 seconds ago      Exited (0) 21 seconds ago                       hello
afffac98fb68        blockchain101/ethereum-geth:1.6.5   "bash -c './rungeth.s"   17 hours ago        Exited (137) 16 hours ago                       geth-cluster0
92a18adb1acd        blockchain101/ethereum-geth:1.6.5   "bash -c './checkboot"   17 hours ago        Exited (137) 16 hours ago                       geth-cluster1
2efa9f365613        hello-world                         "/hello"                 23 hours ago        Exited (0) 23 hours ago                         furious_keller
[root@i-k11xnd1o ~]# docker start afffac98fb68
afffac98fb68
[root@i-k11xnd1o ~]# docker ps 
CONTAINER ID        IMAGE                               COMMAND                  CREATED             STATUS              PORTS                              NAMES
afffac98fb68        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/bash
root@afffac98fb68:/ethutil# ll
total 32
drwxrwxrwx  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*
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值