首頁 > 軟體

Ubuntu 16.04 安裝Docker

2020-06-16 17:22:46

記錄下在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:~$

更多Docker相關教學見以下內容

Docker安裝應用(CentOS 6.5_x64) http://www.linuxidc.com/Linux/2014-07/104595.htm

Ubuntu 14.04安裝Docker  http://www.linuxidc.com/linux/2014-08/105656.htm

Ubuntu使用VNC執行基於Docker的桌面系統  http://www.linuxidc.com/Linux/2015-08/121170.htm

阿里雲CentOS 6.5 模板上安裝 Docker http://www.linuxidc.com/Linux/2014-11/109107.htm

Ubuntu 15.04下安裝Docker  http://www.linuxidc.com/Linux/2015-07/120444.htm

在Ubuntu Trusty 14.04 (LTS) (64-bit)安裝Docker http://www.linuxidc.com/Linux/2014-10/108184.htm

在 Ubuntu 15.04 上如何安裝Docker及基本用法 http://www.linuxidc.com/Linux/2015-09/122885.htm

Ubuntu 16.04上Docker使用手記 http://www.linuxidc.com/Linux/2016-12/138490.htm


IT145.com E-mail:sddin#qq.com