How to upgrade Docker in Ubuntu
Abstract: In the article "experience DigitalOcean VPS cloud service", we have built a Ubuntu 14.04 VPS operating system environment, and use the Docker package (docker. i/O) after Docker is installed, but the installed version is 1.0.1, some new features are unavailable (for example, docker exec). This article records the latest Docker upgrade method.
First Installation Method: (apt-get)
- Apt-get install-y docker. io
- Ln-sf/usr/bin/docker. io/usr/local/bin/docker
- Sed-I '$ acomplete-F _ docker'/etc/bash_completion.d/docker. io
Installed version:
Update method: (to install the latest version from the Docker official source, first install apt-transport-https and add the Docker official source)
- Sudo apt-get install apt-transport-https
- # Add the Docker repository key to your local keychain
- Sudo apt-key adv -- keyserver keyserver.ubuntu.com -- recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
- # Add the Docker repository to your apt sources list.
- Sudo sh-c "echo deb https://get.docker.io/ubuntu docker main>/etc/apt/sources. list. d/docker. list"
- # Update your sources list
- Sudo apt-get update
- # Run the following command to install the latest docker version:
- Apt-get install-y lxc-docker
- # Update later:
- Apt-get update-y lxc-docker
- Ln-sf/usr/bin/docker/usr/local/bin/docker
Version information after upgrade: