This article explains how to upgrade your CS Docker Engine.
The upgrade process depends on the version that is currently installed and the version that you want to upgrade to:
Before starting the upgrade, make sure you stop all containers running on the host. This ensures your containers have time for cleaning up before exiting, thus avoiding data loss or corruption.
Use these instructions if you’re upgrading your CS Docker Engine within the same minor version. As an example, from 1.1.0 to 1.1.1.
Use these instructions to upgrade YUM-based systems.
Update your docker-engine package:
$ sudo yum upgrade docker-engine
Check that the CS Docker Engine is running:
$ sudo docker info
Use these instructions to upgrade APT-based systems.
Update your docker-engine package:
$ sudo apt-get update && sudo apt-get upgrade docker-engine
Check that the CS Docker Engine is running:
$ sudo docker info
Update your docker-engine package:
$ sudo zypper upgrade docker-engine
Check that the CS Docker Engine is running:
$ sudo docker info
Use these instructions if you’re upgrading your CS Docker Engine within the same major version. As an example, from 1.1.x to 1.2.x.
Use these instructions to upgrade YUM-based systems.
Add the Docker Engine repository.
$ sudo yum-config-manager --add-repo https://packages.docker.com/1.12/yum/repo/main/centos/7
This adds the repository of the latest version of CS Docker Engine. You can customize the URL to install other versions.
Install the new package:
$ sudo yum update docker-engine
Check that the CS Engine is running:
$ sudo docker info
Use these instructions to update APT-based systems.
Add the docker engine repository.
$ echo "deb https://packages.docker.com/1.12/apt/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
This adds the repository of the latest version of CS Docker Engine for the Ubuntu Trusty distribution. Change the “ubuntu-trusty” string to the distribution you’re using:
Update your docker-engine package.
$ sudo apt-get update && sudo apt-get upgrade docker-engine
Check that the CS Engine is running:
$ sudo docker info
Add the docker engine repository.
$ sudo zypper ar -t YUM https://packages.docker.com/1.12/yum/repo/main/opensuse/12.3 docker-1.12
This adds the repository of the latest version of CS Docker Engine. You can customize the URL to install other versions.
Install the new package:
$ sudo zypper update docker-engine
Check that the CS Engine is running:
$ sudo docker info
Use these instructions if you’re upgrading your CS Docker Engine from a version prior to 1.9. In this case you’ll have to first uninstall CS Docker Engine, and then install the latest version.
Use these instructions to upgrade YUM-based systems.
Remove the current CS Engine:
$ sudo yum remove docker-engine-cs
Add the Docker public key for CS packages:
$ sudo rpm --import "https://sks-keyservers.net/pks/lookup?op=get&search=0xee6d536cf7dc86e2d7d56f59a178ac6c6238f52e"
Install yum-utils if necessary:
$ sudo yum install -y yum-utils
Add the repository for the new version and disable the old one.
$ sudo yum-config-manager --add-repo https://packages.docker.com/1.12/yum/repo/main/centos/7
$ sudo yum-config-manager --disable 'Docker_cs*'
This adds the repository of the latest version of CS Docker Engine. You can customize the URL to install other versions.
Install the new package:
$ sudo yum install docker-engine
Enable the Docker daemon as a service and start it.
$ sudo systemctl enable docker.service
$ sudo systemctl start docker.service
Use these instructions to update APT-based systems.
Remove the current Engine:
$ sudo apt-get remove docker-engine-cs
Add the Docker public key for CS packages:
$ curl -s 'https://sks-keyservers.net/pks/lookup?op=get&search=0xee6d536cf7dc86e2d7d56f59a178ac6c6238f52e' | sudo apt-key add --import
Install the HTTPS helper for apt (your system may already have it):
$ sudo apt-get update && sudo apt-get install apt-transport-https
Install additional virtual drivers not in the base image.
$ sudo apt-get install -y linux-image-extra-virtual
You may need to reboot your server after updating the LTS kernel.
Add the repository for the new version:
$ echo "deb https://packages.docker.com/1.12/apt/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
This adds the repository of the latest version of CS Docker Engine for the Ubuntu Trusty distribution. Change the “ubuntu-trusty” string to the distribution you’re using:
Install the upgraded package:
$ sudo apt-get upgrade docker-engine