乌版图16.04下安装 docker,要求已经连接上网络。
终端下输入
docker version
然后终端会提醒你输入
sudo apt install docker.io
提示您希望继续执行吗? [Y/n]
输入y
等待安装完毕后
输入 sudo su
或者进入root账户,若是还没有建立管理员账户,则输入sudo passwd root然后输入密码先建立root管理员账户。
再输入一次docker version
若出现如下信息,则表示安装成功
Client:
Version: 1.12.6
API version: 1.24
Go version: go1.6.2
Git commit: 78d1802
Built: Tue Jan 31 23:35:14 2017
OS/Arch: linux/amd64
Server:
Version: 1.12.6
API version: 1.24
Go version: go1.6.2
Git commit: 78d1802
Built: Tue Jan 31 23:35:14 2017
OS/Arch: linux/amd64
若是在普通用户模式下输入docker version,则只显示
Client:
Version: 1.12.6
API version: 1.24
Go version: go1.6.2
Git commit: 78d1802
Built: Tue Jan 31 23:35:14 2017
OS/Arch: linux/amd64
好的,docker安装成功。
然后打开新的终端,在普通用户模式下输入
# 安装结束 打开 docker服务
$ sudo service docker start
系统会提示你输入密码,然后输入
# 验证安装
$ sudo docker run hello-world
首次输入时会先出现如下信息
Unable to find image 'hello-world:latest' locally#意思就是当地没有,然后他会自自动在网上搜索。
如出现如下信息,则表示安装的docker可以正常使用。
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/
好的docker安装完毕,恭喜你!
终端下输入
docker version
然后终端会提醒你输入
sudo apt install docker.io
提示您希望继续执行吗? [Y/n]
输入y
等待安装完毕后
输入 sudo su
或者进入root账户,若是还没有建立管理员账户,则输入sudo passwd root然后输入密码先建立root管理员账户。
再输入一次docker version
若出现如下信息,则表示安装成功
Client:
Version: 1.12.6
API version: 1.24
Go version: go1.6.2
Git commit: 78d1802
Built: Tue Jan 31 23:35:14 2017
OS/Arch: linux/amd64
Server:
Version: 1.12.6
API version: 1.24
Go version: go1.6.2
Git commit: 78d1802
Built: Tue Jan 31 23:35:14 2017
OS/Arch: linux/amd64
若是在普通用户模式下输入docker version,则只显示
Client:
Version: 1.12.6
API version: 1.24
Go version: go1.6.2
Git commit: 78d1802
Built: Tue Jan 31 23:35:14 2017
OS/Arch: linux/amd64
好的,docker安装成功。
然后打开新的终端,在普通用户模式下输入
# 安装结束 打开 docker服务
$ sudo service docker start
系统会提示你输入密码,然后输入
# 验证安装
$ sudo docker run hello-world
首次输入时会先出现如下信息
Unable to find image 'hello-world:latest' locally#意思就是当地没有,然后他会自自动在网上搜索。
如出现如下信息,则表示安装的docker可以正常使用。
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/
好的docker安装完毕,恭喜你!