文档介绍:开始docker
安装
docker 目前只支持64位系统
,简直太方便了
$ curl -fsSL / | sh
run hello-world
$ docker run hello-world
Cannot connect to the Docker daemon. Is the docker daemon running on this host?
需要创建一个用户到docker 组中。$ sudo usermod -aG docker $(whoami)$ sudo reboot
注意:需要reboot之后才能使用
成功运行******@zane-V:~$ sudo docker run hello-world
Hello from Docker!
This message shows that your installation appears to be working 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 Hub account:
For more examples and ideas, visit:
-world做的动作
Docker客户端联系Docker用例
Docker用例从Docker Hub 中将“hello-world”image 拉下来。
Docker 用例从“hello-world” image 创建一个新的容器。而这个image运行着产生你现在读到的信息的 可执行性文件。
Docker用例再讲这些输出传送到Docker客户端,然后Docker客户端在将这些信息传送到你的屏幕
ps -a 显示系统中所有的容器
******@zane-V:~$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
767a0a0f0bae hello-world "/hello" 30 minutes ago Exited (0) 30 minutes ago silly_mcnulty
9e6a3cb1e18b hello-world "/hello" 33 minutes ago Exited (0) 33 minutes ago tender_kare
******@zane-V:~$ docker ps
CONTAINER ID IMAGE COMMAND