| 5 | |
| 6 | == Update your apt sources |
| 7 | |
| 8 | Docker’s APT repository contains Docker 1.7.1 and higher. To set APT to use packages from the new repository: |
| 9 | |
| 10 | 1. Log into your machine as a user with sudo or root privileges. |
| 11 | |
| 12 | 2. Open a terminal window. |
| 13 | |
| 14 | 3. Update package information, ensure that APT works with the https method, and that CA certificates are installed. |
| 15 | |
| 16 | {{{$ sudo apt-get update |
| 17 | $ sudo apt-get install apt-transport-https ca-certificates }}} |
| 18 | |
| 19 | 4. Add the new GPG key. |
| 20 | |
| 21 | {{{$ sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D }}} |
| 22 | |
| 23 | 5. Open the /etc/apt/sources.list.d/docker.list file in your favorite editor. |
| 24 | |
| 25 | If the file doesn’t exist, create it. |
| 26 | |
| 27 | 6. Remove any existing entries. |
| 28 | |
| 29 | 7. Add an entry for your Ubuntu operating system. |
| 30 | |
| 31 | The possible entries are: |
| 32 | |
| 33 | Ubuntu Xenial 16.04 (LTS) |
| 34 | |
| 35 | {{{deb https://apt.dockerproject.org/repo ubuntu-xenial main}}} |
| 36 | |
| 37 | 8. Save and close the /etc/apt/sources.list.d/docker.list file. |
| 38 | |
| 39 | 9. Update the APT package index. |
| 40 | |
| 41 | {{{$ sudo apt-get update}}} |
| 42 | |
| 43 | 10. Purge the old repo if it exists. |
| 44 | |
| 45 | {{{$ sudo apt-get purge lxc-docker}}} |
| 46 | |
| 47 | 11. Verify that APT is pulling from the right repository. |
| 48 | |
| 49 | {{{$ apt-cache policy docker-engine}}} |
| 50 | |
| 51 | From now on when you run apt-get upgrade, APT pulls from the new repository. |
| 52 | |