<commit_before>---
redirect_from:
- /engine/installation/ubuntulinux/
- /installation/ubuntulinux/
description: 'Instructions for installing Docker on Ubuntu. '
keywords:
- Docker, Docker documentation, requirements, apt, installation,  ubuntu
title: Install Docker on Ubuntu
---

Docker is supported on these Ubuntu operating systems:

- Ubuntu Xenial 16.04 (LTS)
- Ubuntu Trusty 14.04 (LTS)
- Ubuntu Precise 12.04 (LTS)

This page instructs you to install using Docker-managed release packages and
installation mechanisms. Using these packages ensures you get the latest official
release of Docker. If you are required to install using Ubuntu-managed packages,
consult the Ubuntu documentation.

>**Note**: Ubuntu Utopic 14.10 and 15.04 exist in Docker's `APT` repository but
are no longer officially supported.

## Prerequisites

Docker requires a 64-bit installation regardless of your Ubuntu version.
Additionally, your kernel must be 3.10 at minimum. The latest 3.10 minor version
or a newer maintained version are also acceptable.

Kernels older than 3.10 lack some of the features required to run Docker
containers. These older versions have known bugs which cause data loss
and frequently panic under certain conditions.

To check your current kernel version, open a terminal and use `uname -r` to
display your kernel version:

    $ uname -r
    3.11.0-15-generic

>**Note**: If you previously installed Docker using `APT`, make sure you update
your `APT` sources to the new Docker repository.

### Update your apt sources

Docker's `APT` repository contains Docker 1.7.1 and higher. To set `APT` to use
packages from the Docker repository:

1.  Log into your machine as a user with `sudo` or `root` privileges.

2.  Open a terminal window.

3.  Update package information, ensure that APT works with the `https` method, and that CA certificates are installed.

    ```bash
    $ sudo apt-get update
    $ sudo apt-get install apt-transport-https ca-certificates
    ```
4.  Add the new `GPG` key.

    ```bash
    $ sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys <KEY>
    ```

5.  Find the entry for your Ubuntu operating system.

    The entry determines where APT will search for packages. The possible entries
    are:

    | Ubuntu version      | Repository                                                  |
    | ------------------- | ----------------------------------------------------------- |
    | Precise 12.04 (LTS) | `deb https://apt.dockerproject.org/repo ubuntu-precise main`|
    | Trusty 14.04 (LTS)  | `deb https://apt.dockerproject.org/repo ubuntu-trusty main` |
    | Xenial 16.04 (LTS)  | `deb https://apt.dockerproject.org/repo ubuntu-xenial main` |


    >**Note**: Docker does not provide packages for all architectures. Binary artifacts
    are built nightly, and you can download them from
    https://master.dockerproject.org. To install docker on a multi-architecture
    system, add an `[arch=...]` clause to the entry. Refer to
    [Debian Multiarch wiki](https://wiki.debian.org/Multiarch/HOWTO#Setting_up_apt_sources)
    for details.

6.  Run the following command, substituting the entry for your operating system
    for the placeholder `<REPO>`.

    ```bash
    $ echo "<REPO>" | sudo tee /etc/apt/sources.list.d/docker.list
    ```

7.  Update the `APT` package index.

    ```bash
    $ sudo apt-get update
    ```

8.  Verify that `APT` is pulling from the right repository.

    When you run the following command, an entry is returned for each version of
    Docker that is available for you to install. Each entry should have the URL
    `https://apt.dockerproject.org/repo/`. The version currently installed is
    marked with `***`.The output below is truncated.

    ```bash
    $ apt-cache policy docker-engine

      docker-engine:
        Installed: 1.12.2-0~trusty
        Candidate: 1.12.2-0~trusty
        Version table:
       *** 1.12.2-0~trusty 0
              500 https://apt.dockerproject.org/repo/ ubuntu-trusty/main amd64 Packages
              100 /var/lib/dpkg/status
           1.12.1-0~trusty 0
              500 https://apt.dockerproject.org/repo/ ubuntu-trusty/main amd64 Packages
           1.12.0-0~trusty 0
              500 https://apt.dockerproject.org/repo/ ubuntu-trusty/main amd64 Packages
           1.11.2-0~trusty 0
              500 https://apt.dockerproject.org/repo/ ubuntu-trusty/main amd64 Packages
           1.11.1-0~trusty 0
              500 https://apt.dockerproject.org/repo/ ubuntu-trusty/main amd64 Packages
    ```
From now on when you run `apt-get upgrade`, `APT` pulls from the new repository.

### Prerequisites by Ubuntu Version

- Ubuntu Xenial 16.04 (LTS)
- Ubuntu Trusty 14.04 (LTS)

For Ubuntu Trusty, and Xenial, it's recommended to install the
`linux-image-extra-*` kernel packages. The `linux-image-extra-*` packages
allows you use the `aufs` storage driver.

To install the `linux-image-extra-*` packages:

1. Open a terminal on your Ubuntu host.

2. Update your package manager.

        $ sudo apt-get update

3. Install the recommended packages.

        $ sudo apt-get install linux-image-extra-$(uname -r) linux-image-extra-virtual

4. Go ahead and install Docker.

#### Ubuntu Precise 12.04 (LTS)

For Ubuntu Precise, Docker requires the 3.13 kernel version. If your kernel
version is older than 3.13, you must upgrade it. Refer to this table to see
which packages are required for your environment:

<table>
  <thead><commit_msg>Revert "remove ubuntu wily 15.10"<commit_after>---
redirect_from:
- /engine/installation/ubuntulinux/
- /installation/ubuntulinux/
description: 'Instructions for installing Docker on Ubuntu. '
keywords:
- Docker, Docker documentation, requirements, apt, installation,  ubuntu
title: Install Docker on Ubuntu
---

Docker is supported on these Ubuntu operating systems:

- Ubuntu Xenial 16.04 (LTS)
- Ubuntu Wily 15.10
- Ubuntu Trusty 14.04 (LTS)
- Ubuntu Precise 12.04 (LTS)

This page instructs you to install using Docker-managed release packages and
installation mechanisms. Using these packages ensures you get the latest official
release of Docker. If you are required to install using Ubuntu-managed packages,
consult the Ubuntu documentation.

>**Note**: Ubuntu Utopic 14.10 and 15.04 exist in Docker's `APT` repository but
are no longer officially supported.

## Prerequisites

Docker requires a 64-bit installation regardless of your Ubuntu version.
Additionally, your kernel must be 3.10 at minimum. The latest 3.10 minor version
or a newer maintained version are also acceptable.

Kernels older than 3.10 lack some of the features required to run Docker
containers. These older versions have known bugs which cause data loss
and frequently panic under certain conditions.

To check your current kernel version, open a terminal and use `uname -r` to
display your kernel version:

    $ uname -r
    3.11.0-15-generic

>**Note**: If you previously installed Docker using `APT`, make sure you update
your `APT` sources to the new Docker repository.

### Update your apt sources

Docker's `APT` repository contains Docker 1.7.1 and higher. To set `APT` to use
packages from the Docker repository:

1.  Log into your machine as a user with `sudo` or `root` privileges.

2.  Open a terminal window.

3.  Update package information, ensure that APT works with the `https` method, and that CA certificates are installed.

    ```bash
    $ sudo apt-get update
    $ sudo apt-get install apt-transport-https ca-certificates
    ```
4.  Add the new `GPG` key.

    ```bash
    $ sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys <KEY>
    ```

5.  Find the entry for your Ubuntu operating system.

    The entry determines where APT will search for packages. The possible entries
    are:

    | Ubuntu version      | Repository                                                  |
    | ------------------- | ----------------------------------------------------------- |
    | Precise 12.04 (LTS) | `deb https://apt.dockerproject.org/repo ubuntu-precise main`|
    | Trusty 14.04 (LTS)  | `deb https://apt.dockerproject.org/repo ubuntu-trusty main` |
    | Wily 15.10          | `deb https://apt.dockerproject.org/repo ubuntu-wily main`   |
    | Xenial 16.04 (LTS)  | `deb https://apt.dockerproject.org/repo ubuntu-xenial main` |


    >**Note**: Docker does not provide packages for all architectures. Binary artifacts
    are built nightly, and you can download them from
    https://master.dockerproject.org. To install docker on a multi-architecture
    system, add an `[arch=...]` clause to the entry. Refer to
    [Debian Multiarch wiki](https://wiki.debian.org/Multiarch/HOWTO#Setting_up_apt_sources)
    for details.

6.  Run the following command, substituting the entry for your operating system
    for the placeholder `<REPO>`.

    ```bash
    $ echo "<REPO>" | sudo tee /etc/apt/sources.list.d/docker.list
    ```

7.  Update the `APT` package index.

    ```bash
    $ sudo apt-get update
    ```

8.  Verify that `APT` is pulling from the right repository.

    When you run the following command, an entry is returned for each version of
    Docker that is available for you to install. Each entry should have the URL
    `https://apt.dockerproject.org/repo/`. The version currently installed is
    marked with `***`.The output below is truncated.

    ```bash
    $ apt-cache policy docker-engine

      docker-engine:
        Installed: 1.12.2-0~trusty
        Candidate: 1.12.2-0~trusty
        Version table:
       *** 1.12.2-0~trusty 0
              500 https://apt.dockerproject.org/repo/ ubuntu-trusty/main amd64 Packages
              100 /var/lib/dpkg/status
           1.12.1-0~trusty 0
              500 https://apt.dockerproject.org/repo/ ubuntu-trusty/main amd64 Packages
           1.12.0-0~trusty 0
              500 https://apt.dockerproject.org/repo/ ubuntu-trusty/main amd64 Packages
           1.11.2-0~trusty 0
              500 https://apt.dockerproject.org/repo/ ubuntu-trusty/main amd64 Packages
           1.11.1-0~trusty 0
              500 https://apt.dockerproject.org/repo/ ubuntu-trusty/main amd64 Packages
    ```
From now on when you run `apt-get upgrade`, `APT` pulls from the new repository.

### Prerequisites by Ubuntu Version

- Ubuntu Xenial 16.04 (LTS)
- Ubuntu Wily 15.10
- Ubuntu Trusty 14.04 (LTS)

For Ubuntu Trusty, Wily, and Xenial, it's recommended to install the
`linux-image-extra-*` kernel packages. The `linux-image-extra-*` packages
allows you use the `aufs` storage driver.

To install the `linux-image-extra-*` packages:

1. Open a terminal on your Ubuntu host.

2. Update your package manager.

        $ sudo apt-get update

3. Install the recommended packages.

        $ sudo apt-get install linux-image-extra-$(uname -r) linux-image-extra-virtual

4. Go ahead and install Docker.

#### Ubuntu Precise 12.04 (LTS)

For Ubuntu Precise, Docker requires the 3.13 kernel version. If your kernel
version is older than 3.13, you must upgrade it. Refer to this table to see
which packages are required for your environment:

<table>
  <thead>
{'fraction_non_alphanumeric': 0.10494604316546763, 'fraction_numerical': 0.029136690647482016, 'mean_word_length': 2.8085616438356165, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 19, 'https://': 23, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6874935', 'n_tokens_mistral': 3676, 'n_tokens_neox': 3131, 'n_words': 1274}