X

於 Debian jessie 安裝 Docker engine

於 Debian Linux Jessie 安裝 / 移除 Docker 要怎麼做?

於 Debian jessie 安裝 Docker engine

於 Debian Linux Jessie 安裝 Docker,安裝方式參考此篇:Install Docker on Debian - Docker

  1. vim /etc/apt/sources.list.d/docker.list
    deb https://apt.dockerproject.org/repo debian-jessie main
  2. apt-get update
  3. 若直接 apt-get install docker-engine 會出現下述錯誤:(所以要先安裝第四步驟)
    E: 找不到安裝方式的驅動程式 /usr/lib/apt/methods/https。
    N: Is the package apt-transport-https installed?
  4. sudo apt-get install apt-transport-https ca-certificates
  5. $ apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys # 增加 key
    58118E89F3A912897C070ADBF76221572C52609D
  6. sudo apt-get install docker-engine
  7. sudo systemctl start docker
  8. sudo systemctl enable docker # 設定開機自動啟動
  9. systemctl status docker # 查看 docker 狀態
  10. sudo docker run hello-world # 測試

或者下述一行搞定:

  1. curl -fsSL https://get.docker.com/ | sh
  2. 取自:Example: Install Docker on Ubuntu Linux - Docker

或由 Debian jessie 的 backports 安裝,如下述步驟:

  1. vim /etc/apt/sources.list
    deb http://ftp.tw.debian.org/debian jessie-backports main
  2. apt-get -t jessie-backports install "docker.io"

Docker engine 移除

  1. sudo apt-get purge docker-engine
  2. sudo apt-get autoremove --purge docker-engine
  3. rm -rf /var/lib/docker # docker images 都放在這邊
  4. 註:若在安裝新版,此舊版有可能出現此錯誤訊息「prior storage driver \"aufs\" failed: driver not support」,此時就用此作法移除乾淨,在重新 apt-get install docker.io 即可

相關網頁

Save

Save

Save

Save

Save

Tsung: 對新奇的事物都很有興趣, 喜歡簡單的東西, 過簡單的生活.
Related Post