问题描述
我正在尝试运行最新的稳定版 docker 和 docker-compose.
I am trying to run the latest stable version of docker and docker-compose.
我正在按照 https://docs.docker.com/engine 上的说明进行操作/installation/linux/ubuntulinux/
显然 docker-compose 的当前版本是 1.7.
Apparently the current version of docker-compose is 1.7.
然而,在浏览文档,安装 docker-engine 之后,我得到:
Yet, after running through the documentation, installing docker-engine, I then get:
$ docker-compose --version
docker-compose version: 1.4.0
和
$ docker --version
Docker version 1.11.1, build 5604cbe
当我尝试更新它时,我得到以下信息:
When I try to update it, I get the following:
$ sudo apt-get upgrade docker-engine
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... docker-engine is already the newest version.
Done
更新
这只会变得越来越陌生.在尝试了以下所有建议后,我现在明白了:
This just keeps getting stranger. After trying all of the advice below, I now get this:
$ docker-compose -v
The program 'docker-compose' is currently not installed. You can install it by typing:
sudo apt-get install docker-compose
anton@Charles:~$ sudo apt-get install docker-compose
Reading package lists... Done
Building dependency tree
Reading state information... Done
docker-compose is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
那我如何更新 docker?
How then can I update docker?
推荐答案
试试这个:
sudo sh -c "wget -qO- https://get.docker.io/gpg | apt-key add -"
sudo sh -c "echo deb http://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list"
sudo aptitude update
sudo aptitude install lxc-docker
如果这不起作用,让我们通过第三方来做:
If this is not working, lets do it via third party :
$ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
$ sudo sh -c "echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list"
$ sudo apt-get update
$ sudo apt-get install lxc-docker
这篇关于Ubuntu 和更新 Docker的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!