1. 程式人生 > >ubuntu安裝docker-ce

ubuntu安裝docker-ce

版本 erro nbsp 依賴 triggers 更新 一個 package ron

Docker Community Edition (CE)/Docker社區版非常適合希望開始使用Docker並嘗試使用基於容器的應用程序的開發人員和小型團隊。Docker CE有2個版本:stable and edge:

  • Stable:每一個季度提供穩定的更新
  • Edge:每一個月都有新的功能

以下是官網的安裝文檔,涉及到各種操作系統的安裝方式

https://docs.docker.com/engine/installation/

本文淺嘗輒止,在ubuntu14.04上安裝最新版的Dokcer CE Stable,並且都是以root來運行。

===============================================

0x01 update

更新一番總是沒有錯的。

apt-get update

0x02 基於deb安裝包來安裝docker-ce

ubuntu的docker-ce鏡像:

https://download.docker.com/linux/ubuntu/dists/

這裏我是選擇14.04(trusty)的最新版Dokcer CE Stable

https://download.docker.com/linux/ubuntu/dists/trusty/pool/stable/amd64/

這裏面目前最新的是2017-09-27 01:48的docker-ce_17.09.0~ce-0~ubuntu_amd64.deb

下載後放在ubuntu目錄下,運行

dpkg -i docker-ce_17.09.0~ce-0~ubuntu_amd64.deb

0x03 libltdl7和libsystemd-journal0依賴問題

當安裝時候報錯如下:

dpkg: dependency problems prevent configuration of docker-ce:
 docker-ce depends on libltdl7 (>= 2.4.2); however:
  Package libltdl7 is not installed.
 docker-ce depends on libsystemd-journal0 (>= 201
); however: Package libsystemd-journal0 is not installed. dpkg: error processing package docker-ce (--install): dependency problems - leaving unconfigured Processing triggers for ureadahead (0.100.0-16) ... ureadahead will be reprofiled on next reboot Processing triggers for man-db (2.6.7.1-1ubuntu1) ... Errors were encountered while processing: docker-ce

先安裝libltdl7和libsystemd-journal0

apt-get install -y libltdl7 libsystemd-journal0

安裝後再去安裝docker-ce即可

安裝好後運行docker -v,得到

Docker version 17.09.0-ce, build afdb6d4

ubuntu安裝docker-ce