於 Debian Linux Jessie 安裝 / 移除 Docker 要怎麼做?
於 Debian jessie 安裝 Docker engine
於 Debian Linux Jessie 安裝 Docker,安裝方式參考此篇:Install Docker on Debian - Docker
- vim /etc/apt/sources.list.d/docker.list
deb https://apt.dockerproject.org/repo debian-jessie main - apt-get update
- 若直接 apt-get install docker-engine 會出現下述錯誤:(所以要先安裝第四步驟)
E: 找不到安裝方式的驅動程式 /usr/lib/apt/methods/https。
N: Is the package apt-transport-https installed? - sudo apt-get install apt-transport-https ca-certificates
- $ apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys # 增加 key
58118E89F3A912897C070ADBF76221572C52609D - sudo apt-get install docker-engine
- sudo systemctl start docker
- sudo systemctl enable docker # 設定開機自動啟動
- systemctl status docker # 查看 docker 狀態
- sudo docker run hello-world # 測試
或者下述一行搞定:
- curl -fsSL https://get.docker.com/ | sh
- 取自:Example: Install Docker on Ubuntu Linux - Docker
或由 Debian jessie 的 backports 安裝,如下述步驟:
- vim /etc/apt/sources.list
deb http://ftp.tw.debian.org/debian jessie-backports main - apt-get -t jessie-backports install "docker.io"
Docker engine 移除
- sudo apt-get purge docker-engine
- sudo apt-get autoremove --purge docker-engine
- rm -rf /var/lib/docker # docker images 都放在這邊
- 註:若在安裝新版,此舊版有可能出現此錯誤訊息「prior storage driver \"aufs\" failed: driver not support」,此時就用此作法移除乾淨,在重新 apt-get install docker.io 即可
相關網頁
- Install Docker on Debian 8 Jessie Via Offical Repository
- Backports - Debian Wiki
- Debian Backports ›› Instructions
Save
Save
Save
Save
Save