歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> Ubuntu 16.04 安裝Docker

Ubuntu 16.04 安裝Docker

日期:2017/2/28 13:44:03   编辑:Linux教程

記錄下在Ubuntu 16.04 中安裝Docker的過程。

1 更改apt源,更改前先對sources.list文件進行備分

linuxidc@linuxidc:~$ sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak

修改sources.list文件

sudo gedit /etc/apt/sources.list
deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse

更新apt源

linuxidc@linuxidc:~$ sudo apt-get update

2 安裝Docker

linuxidc@linuxidc:~$ sudo apt-get install docker.io

安裝完成後,需要重啟下系統。

sudo reboot

3 驗證

linuxidc@linuxidc:~$ sudo docker info
Containers: 0
Images: 0
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 0
Dirperm1 Supported: true
Execution Driver: native-0.2
Kernel Version: 4.4.0-22-generic
Operating System: Ubuntu 16.04 LTS (containerized)
CPUs: 4
Total Memory: 3.842 GiB
Name: linuxidc
ID: H6MK:VMBX:ARD3:R4GN:VMVW:WHPW:AM35:JYVZ:QVYV:2L4M:AWCQ:QOPJ
WARNING: No swap limit support
linuxidc@linuxidc:~$

Copyright © Linux教程網 All Rights Reserved