|
本帖最后由 java 于 2017-5-24 16:49 编辑
//////////////////安装//////////////////
ubuntu 安装:
uname -r 查看你当前的内核版本 要高于 3.10
使用脚本安装 Docker
1、获取最新版本的 Docker 安装包
runoob@runoob:~$ wget -qO- https://get.docker.com/ | sh
安装完成后有个提示:
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 runoob
Remember that you will have to log out and back in for this to take effect!
当要以非root用户可以直接运行docker时,需要执行 sudo usermod -aG docker runoob 命令,然后重新登陆
2、启动docker 后台服务
runoob@runoob:~$ sudo service docker start
查看后台运行的进程
ps -ef | grep docker
3、测试运行hello-world
runoob@runoob:~$ docker run hello-world
/////////////////////
docker --help
-ubuntu:~$ docker --version
Docker version 17.05.0-ce, build 89658be
-ubuntu:~$ docker version
Client:
Version: 17.05.0-ce
API version: 1.29
Go version: go1.7.5
Git commit: 89658be
Built: Thu May 4 22:10:54 2017
OS/Arch: linux/amd64
Server:
Version: 17.05.0-ce
API version: 1.29 (minimum version 1.12)
Go version: go1.7.5
Git commit: 89658be
Built: Thu May 4 22:10:54 2017
OS/Arch: linux/amd64
Experimental: false
////////////////////////////////////////////////////
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/
|
|