2013-05-21 13:47:16 -04:00
|
|
|
:title: Upgrading
|
|
|
|
:description: These instructions are for upgrading Docker
|
|
|
|
:keywords: Docker, Docker documentation, upgrading docker, upgrade
|
|
|
|
|
2013-03-29 20:30:10 -04:00
|
|
|
.. _upgrading:
|
|
|
|
|
|
|
|
Upgrading
|
2013-08-28 20:26:10 -04:00
|
|
|
=========
|
2013-03-29 20:30:10 -04:00
|
|
|
|
2013-08-28 20:26:10 -04:00
|
|
|
The technique for upgrading ``docker`` to a newer version depends on
|
|
|
|
how you installed ``docker``.
|
2013-03-29 20:30:10 -04:00
|
|
|
|
2013-08-28 20:26:10 -04:00
|
|
|
.. versionadded:: 0.5.3
|
|
|
|
You may wish to add a ``docker`` group to your system to avoid using sudo with ``docker``. (see :ref:`dockergroup`)
|
2013-03-29 20:30:10 -04:00
|
|
|
|
|
|
|
|
2013-08-28 20:26:10 -04:00
|
|
|
After ``apt-get``
|
|
|
|
-----------------
|
|
|
|
|
|
|
|
If you installed Docker using ``apt-get`` or Vagrant, then you should
|
|
|
|
use ``apt-get`` to upgrade.
|
|
|
|
|
|
|
|
.. versionadded:: 0.6
|
|
|
|
Add Docker repository information to your system first.
|
2013-03-29 20:30:10 -04:00
|
|
|
|
2013-05-15 19:11:59 -04:00
|
|
|
.. code-block:: bash
|
2013-03-29 20:30:10 -04:00
|
|
|
|
2013-08-28 20:26:10 -04:00
|
|
|
# Add the Docker repository key to your local keychain
|
|
|
|
sudo sh -c "curl https://get.docker.io/gpg | apt-key add -"
|
|
|
|
|
|
|
|
# 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"
|
|
|
|
|
2013-05-15 19:11:59 -04:00
|
|
|
# update your sources list
|
|
|
|
sudo apt-get update
|
2013-03-29 20:30:10 -04:00
|
|
|
|
2013-05-15 19:11:59 -04:00
|
|
|
# install the latest
|
|
|
|
sudo apt-get install lxc-docker
|
2013-03-29 20:30:10 -04:00
|
|
|
|
|
|
|
|
2013-05-15 19:11:59 -04:00
|
|
|
After manual installation
|
|
|
|
-------------------------
|
2013-03-29 20:30:10 -04:00
|
|
|
|
2013-08-28 20:26:10 -04:00
|
|
|
If you installed the Docker :ref:`binaries` then follow these steps:
|
2013-05-15 19:11:59 -04:00
|
|
|
|
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
|
|
|
# kill the running docker daemon
|
|
|
|
killall docker
|
2013-03-29 20:30:10 -04:00
|
|
|
|
|
|
|
|
2013-05-15 19:11:59 -04:00
|
|
|
.. code-block:: bash
|
2013-03-29 20:30:10 -04:00
|
|
|
|
2013-05-15 19:11:59 -04:00
|
|
|
# get the latest binary
|
2013-09-24 23:25:45 -04:00
|
|
|
wget http://get.docker.io/builds/Linux/x86_64/docker-latest -O docker
|
|
|
|
|
|
|
|
# make it executable
|
|
|
|
chmod +x docker
|
2013-05-15 19:11:59 -04:00
|
|
|
|
2013-03-29 20:30:10 -04:00
|
|
|
|
2013-08-28 20:26:10 -04:00
|
|
|
Start docker in daemon mode (``-d``) and disconnect, running the
|
|
|
|
daemon in the background (``&``). Starting as ``./docker`` guarantees
|
|
|
|
to run the version in your current directory rather than a version
|
|
|
|
which might reside in your path.
|
2013-03-29 20:30:10 -04:00
|
|
|
|
2013-05-15 19:11:59 -04:00
|
|
|
.. code-block:: bash
|
2013-03-29 20:30:10 -04:00
|
|
|
|
2013-05-15 19:11:59 -04:00
|
|
|
# start the new version
|
2013-03-29 20:30:10 -04:00
|
|
|
sudo ./docker -d &
|
|
|
|
|
|
|
|
|
2013-09-24 23:25:45 -04:00
|
|
|
Alternatively you can replace the docker binary in ``/usr/local/bin``.
|