Install CS Docker Engine

Estimated reading time: 9 minutes

Follow these instructions to install CS Docker Engine, the commercially supported version of Docker Engine.

CS Docker Engine can be installed on the following operating systems:

You can install CS Docker Engine using a repository or using packages.

  • If you use a repository, your operating system will notify you when updates are available and you can upgrade or downgrade easily, but you need an internet connection. This approach is recommended.

  • If you use packages, you can install CS Docker Engine on air-gapped systems that have no internet connection. However, you are responsible for manually checking for updates and managing upgrades.

Prerequisites

To install CS Docker Engine, you need root or sudo privileges and you need access to a command line on the system.

Install using a repository

Install on CentOS 7.1/7.2 & RHEL 7.0/7.1/7.2/7.3 (YUM-based systems)

This section explains how to install on CentOS 7.1/7.2 & RHEL 7.0/7.1/7.2/7.3. Only these versions are supported. CentOS 7.0 is not supported. On RHEL, depending on your current level of updates, you may need to reboot your server to update its RHEL kernel.

  1. Add the Docker public key for CS Docker Engine packages:

    $ sudo rpm --import "https://sks-keyservers.net/pks/lookup?op=get&search=0xee6d536cf7dc86e2d7d56f59a178ac6c6238f52e"
    

    Note: If the key server above does not respond, you can try one of these:

    • pgp.mit.edu
    • keyserver.ubuntu.com
  2. Install yum-utils if necessary:

    $ sudo yum install -y yum-utils
    
  3. Add the Docker 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 an older version.

  4. Install Docker CS Engine:

    • Latest version:

      $ sudo yum makecache fast
      
      $ sudo yum install docker-engine
      
    • Specific version:

      On production systems, you should install a specific version rather than relying on the latest.

      1. List the available versions:

        $ yum list docker-engine.x86_64  --showduplicates |sort -r
        

        The second column represents the version.

      2. Install a specific version by adding the version after docker-engine, separated by a hyphen (-):

        $ sudo yum install docker-engine-<version>
        
  5. Configure devicemapper:

    By default, the devicemapper graph driver does not come pre-configured in a production-ready state. Follow the documented step by step instructions to configure devicemapper with direct-lvm for production to achieve the best performance and reliability for your environment.

  6. Configure the Docker daemon to start automatically when the system starts, and start it now.

    $ sudo systemctl enable docker.service
    $ sudo systemctl start docker.service
    
  7. Confirm the Docker daemon is running:

    $ sudo docker info
    
  8. Only users with sudo access will be able to run docker commands. Optionally, add non-sudo access to the Docker socket by adding your user to the docker group.

    $ sudo usermod -a -G docker $USER
    
  9. Log out and log back in to have your new permissions take effect.

Install on Ubuntu 14.04 LTS or 16.04 LTS

  1. Install packages to allow apt to use a repository over HTTPS:

    $ sudo apt-get update
    
    $ sudo apt-get install --no-install-recommends \
        apt-transport-https \
        curl \
        software-properties-common
    

    Optionally, install additional kernel modules to add AUFS support.

    $ sudo apt-get install -y --no-install-recommends \
        linux-image-extra-$(uname -r) \
        linux-image-extra-virtual
    
  2. Download and import Docker’s public key for CS packages:

    $ curl -fsSL 'https://sks-keyservers.net/pks/lookup?op=get&search=0xee6d536cf7dc86e2d7d56f59a178ac6c6238f52e' | sudo apt-key add -
    

    Note: If the key server above does not respond, you can try one of these:

    • pgp.mit.edu
    • keyserver.ubuntu.com
  3. Add the repository. In the command below, the lsb_release -cs sub-command returns the name of your Ubuntu version, like xenial or trusty.

    $ sudo add-apt-repository \
       "deb https://packages.docker.com/1.12/apt/repo/ \
       ubuntu-$(lsb_release -cs) \
       main"
    
  4. Install CS Docker Engine:

    • Latest version:

      $ sudo apt-get update
      
      $ sudo apt-get -y install docker-engine
      
    • Specific version:

      On production systems, you should install a specific version rather than relying on the latest.

      1. List the available versions:

        $ sudo apt-get update
        
        $ apt-cache madison docker-engine
        

        The second column represents the version.

      2. Install a specific version by adding the version after docker-engine, separated by an equals sign (=):

        $ sudo apt-get install docker-engine=<version>
        
  5. Confirm the Docker daemon is running:

    $ sudo docker info
    
  6. Only users with sudo access will be able to run docker commands. Optionally, add non-sudo access to the Docker socket by adding your user to the docker group.

    $ sudo usermod -a -G docker $USER
    

    Log out and log back in to have your new permissions take effect.

Install on SUSE Linux Enterprise 12.3

  1. Refresh your repository:

    $ sudo zypper update
    
  2. Add the Docker repository and public key:

    $ sudo zypper ar -t YUM https://packages.docker.com/1.12/yum/repo/main/opensuse/12.3 docker-1.13
    $ sudo rpm --import 'https://sks-keyservers.net/pks/lookup?op=get&search=0xee6d536cf7dc86e2d7d56f59a178ac6c6238f52e'
    

    This adds the repository of the latest version of CS Docker Engine. You can customize the URL to install an older version.

Note: If the key server above does not respond, you can try one of these: > > - pgp.mit.edu > - keyserver.ubuntu.com

  1. Install CS Docker Engine.

    • Latest version:

      $ sudo zypper refresh
      
      $ sudo zypper install docker-engine
      
    • Specific version:

      On production systems, you should install a specific version rather than relying on the latest.

      1. List the available versions:

        $ sudo zypper refresh
        
        $ zypper search -s --match-exact -t package docker-engine
        

        The third column is the version string.

      2. Install a specific version by adding the version after docker-engine, separated by a hyphen (-):

        $ sudo zypper install docker-engine-<version>
        
  2. Configure the Docker daemon to start automatically when the system starts, and start it now.

    $ sudo systemctl enable docker.service
    $ sudo systemctl start docker.service
    
  3. Confirm the Docker daemon is running:

    $ sudo docker info
    
  4. Only users with sudo access will be able to run docker commands. Optionally, add non-sudo access to the Docker socket by adding your user to the docker group.

    $ sudo usermod -a -G docker $USER
    

    Log out and log back in to have your new permissions take effect.

  5. Configure Btrfs for graph storage. This is the only graph storage driver supported on SLES.

Install using packages

If you need to install Docker on an air-gapped system with no access to the internet, use the package download link table to download the Docker package for your operating system, then install it using the appropriate command. You are responsible for manually upgrading Docker when a new version is available, and also for satisfying Docker’s dependencies.

General commands

To install Docker from packages, use the following commands:

Operating system Command
RHEL / CentOS / SLES $ sudo yum install /path/to/package.rpm
Ubuntu $ sudo dpkg -i /path/to/package.deb

CS Docker Engine 1.12.6

Operating system Package links
RHEL 7.x and CentOS 7 docker-engine, docker-engine-debuginfo, docker-engine-selinux
RHEL 7.2 (only use if you have problems with selinux with the packages above) docker-engine, docker-engine-debuginfo, docker-engine-selinux
SLES 12 docker-engine
Ubuntu Xenial docker-engine
Ubuntu Wily docker-engine
Ubuntu Trusty docker-engine
Ubuntu Precise docker-engine

CS Docker Engine 1.12.5

Operating system Package links
RHEL 7.x and CentOS 7 docker-engine, docker-engine-debuginfo, docker-engine-selinux
SLES 12 docker-engine
Ubuntu Xenial docker-engine
Ubuntu Wily docker-engine
Ubuntu Trusty docker-engine
Ubuntu Precise docker-engine

CS Docker Engine 1.12.3

Operating system Package links
RHEL 7.x and CentOS 7 docker-engine, docker-engine-debuginfo, docker-engine-selinux
SLES 12 docker-engine
Ubuntu Xenial docker-engine
Ubuntu Wily docker-engine
Ubuntu Trusty docker-engine
Ubuntu Precise docker-engine

CS Docker Engine 1.12.2

Operating system Package links
RHEL 7.x and CentOS 7 docker-engine, docker-engine-debuginfo, docker-engine-selinux
SLES 12 docker-engine
Ubuntu Xenial docker-engine
Ubuntu Wily docker-engine
Ubuntu Trusty docker-engine
Ubuntu Precise docker-engine

CS Docker Engine 1.12.1

Operating system Package links
RHEL 7.x and CentOS 7 docker-engine, docker-engine-debuginfo, docker-engine-selinux
SLES 12 docker-engine
Ubuntu Xenial docker-engine
Ubuntu Wily docker-engine
Ubuntu Trusty docker-engine
Ubuntu Precise docker-engine
docker, engine, dtr, install