Docker 安裝筆記



Centos 6.8

yum install -y yum-utils \
  device-mapper-persistent-data lvm2
 
 sudo yum install http://mirrors.yun-idc.com/epel/6/i386/epel-release-6-8.noarch.rpm
 sudo yum install docker-io

Ubuntu

移除舊版本
apt-get remove docker docker-engine docker.io -y
apt-get autoremove -y
apt-get purge -y

安裝相關工具
apt-get update
apt-get install curl -y
apt-get install inux-image-extra-$(uname -r)
apt-get install linux-image-extra-virtual
apt-get install apt-transport-https ca-certificates software
apt-get install apt-transport-https ca-certificates software-properties-common -y

下載並新增APT儲存庫憑證
curl -fsSL https://download.docker.com/linux/ubuntu/gpg |sudo apt-key add -
檢查APT儲存庫憑證
sudo apt-key finger 0EBFCD88

新增docker儲存庫到儲存庫清單
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu stable"
vim /etc/apt/sources.list
deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable
# deb-src [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable
sudo tail -2 /etc/apt/sources.list

更新APT儲存庫
sudo apt update

安裝docker ce 版本
apt-get install docker-ce -y

查看docker版本

docker version

留言

這個網誌中的熱門文章

Linux使用指令更改IP方法

Fortigate-轉port