I type docker.io version, and get:
Client version: 0.9.1
Go version (client): go1.2.1
Git commit (client): 3600720
Server version: 0.9.1
Git commit (server): 3600720
Go version (server): go1.2.1
Last stable version: 0.11.1, please update dockerI follow that with an apt-get update, then either: apt-get upgrade, or apt-get upgrade docker.io, but all it gives me is:
docker.io is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.I'm running Ubuntu 14.04 (trusty) 64bit server.
EDIT: I think I used a script in this Post comment to install docker (since it purported to allow me to just type docker instead of docker.io)
39 Answers
Suppose it is Ubuntu Trusty (14.04) release, which has 0.9.1 officially
Update again in 2017/03/07 to reflect to the changes in new release, see
Official guideline is here Install docker for Ubuntu, old release had different package name.
docker.io: is used to be very old version in default ubuntu repo (can skip here)docker-engine: is used before release 1.13.xdocker-ce: since 17.03
for docker-engine
# add the new gpg key
$ sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
# add new repo
$ sudo add-apt-repository \ "deb [arch=amd64] \ $(lsb_release -cs) \ stable"Then you can smoothly upgrade to latest docker version
$ sudo apt-get update
# remove the old
$ sudo apt-get purge lxc-docker*
# install the new
$ sudo apt-get install docker-engineAnd in the case that you don't want to install latest package then you can do something like below.
$ sudo apt-get install docker-engine=1.7.1-0~trustyfor docker-ce
$ curl -fsSL | sudo apt-key add -
$ sudo add-apt-repository \ "deb [arch=amd64] \ $(lsb_release -cs) \ stable"
$ sudo apt-get update
$ sudo apt-get install docker-ce 8 Warning: Since this is an older Post, please use to official resources to prevent issues:
One way to upgrade to the latest version (without installing from source) is to use the instructions here provided by Digital Ocean:
Add docker repository key to apt-key for package verification
sudo sh -c "wget -qO- | apt-key add -"
Add the docker repository to aptitude sources:
sudo sh -c "echo deb docker main\ > /etc/apt/sources.list.d/docker.list"
Update the repository with the new addition:
sudo aptitude update
Finally, download and install docker:
sudo aptitude install lxc-docker
Short answer: the official Docker install doc now covers this for Ubuntu 14.04 (though it's not as clear as it could be).
The Ubuntu package named docker.io is not maintained by Docker, Inc. and will lag behind the latest version. For example today it's stuck at 0.9.1 and latest is 1.0.1. I would go ahead and remove this if you have it.
The Docker package is named lxc-docker (confusingly, since LXC is no longer strictly required). It is however up to date. You will need to add the Docker-owned repo to your apt-get setup. The official Docker install doc covers this for Ubuntu 14.04 - look for "If you'd like to try the latest version of Docker". Note, the binary will be docker (as opposed to docker.io when provided by Ubuntu).
If you trust get.docker.com, run:
curl -sSL | sudo bash 1 You can install from the third-party repository following the instructions:
$ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
$ sudo sh -c "echo deb docker main > /etc/apt/sources.list.d/docker.list"
$ sudo apt-get update
$ sudo apt-get install lxc-docker You have the latest version of docker.io (0.9.1) which is available in the ubuntu repositories for Trusty Tahr as of today.
However, if you still want to upgrade the version, you can clone the latest version of docker.io from github and recompile. For instructions regarding installing it from source, there is an interactive tutorial on docker.io's blog.
3or just simply sudo apt-get install -f docker-ce to get the latest stable
You also can download the docker.io 0.11.1 .deb file from Launchpad and install.
wget
sudo dpkg -i docker.io_0.11.1~dfsg1-1~ppa1~trusty1_amd64.deb 1 I most commonly used to install the latest Docker and docker-compose:
2