我正在尝试运行docker和docker-compose的最新稳定版本。
我正在按照https://docs.docker.com/engine/installation/linux/ubuntulinux/上的说明进行操作
显然docker-compose的当前版本是1.7。
然而,在运行完文档之后,安装docker-engine,我会得到:
$ docker-compose --version docker-compose version: 1.4.0
和
$ docker --version Docker version 1.11.1, build 5604cbe
当我尝试更新它时,我得到以下内容:
$ 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
更新
这只是越来越陌生。 在尝试了下面的所有build议后,我现在得到这个:
$ 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?
谢谢
试试这个东西:
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
如果这不起作用,让我们通过第三方:
$ 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
因为我在这里失去了半个小时,也许会帮助那里的一些人。 我必须做什么来升级我的版本是:
curl -L "https://github.com/docker/compose/releases/download/1.13.0/docker-compose-$(uname -s)-$(uname -m)" > ./docker-compose sudo mv ./docker-compose /usr/bin/docker-compose sudo chmod +x /usr/bin/docker-compose
使用最新版本的1.13.0
compose而不是1.13.0
。
你现在必须做的是更新码头作曲家,因为你的码头是最新的。
https://docs.docker.com/compose/install/
curl -L https://github.com/docker/compose/releases/download/1.7.0/docker-compose-`uname -s' – 'uname -m'> / usr / local / bin / docker-compose
chmod + x / usr / local / bin / docker-compose
This is a problem when you have docker installed as latest version and docker-compose is old version try docker-compose -V if it gives old version then you have to uninstall via `Pip` `pip uninstall docker-compose` most of the time you uninstall with the same tool how you installed old version it might give some error and partial uninstall Just restart ubuntu and then install docker from https://docs.docker.com/engine/installation/ check docker compose version again hopefully its latest and compatible with docker See the install docs for more install options and instructions. Compose file format compatibility matrix Compose file format Docker Engine 3.0 ; 3.1 1.13.0+ 2.1 1.12.0+ 2.0 1.10.0+ 1.0 1.9.1+ Changes
这似乎为我工作,似乎很简单。
sudo apt-get update sudo apt-get upgrade docker-ce
结果如下
docker-ce is already the newest version.