Docker Installation

Overview

A Docker image is an executable package that includes everything needed to run an application. Avi Vantage for Linux server cloud is distributed as a Docker image. Therefore, having Docker installed is mandatory for Avi Vantage Linux server cloud deployments. If deploying onto multiple hosts, repeat the applicable installation procedure on each host.

Note: To ensure proper Controller core dumps in a container environment (running either host or bridge mode), take care that the dump path is properly set. If not, the core will NOT generated. The core-pattern on the container’s host machine must be initialized prior to bringing up the Avi Controller. The recommendation is to set it to /var/crash/core_dump-%E-%p-%t where
* %E = pathname of executable with slashes(‘/’) replaced by exclamation marks (‘!’)
* %p = PID of dumped process, as seen in the PID namespace in which the process resides.
* %t = time of dump, expressed as seconds since the Epoch, 1970-01-01 00:00:00 + 0000 (UTC)

Docker Editions

Docker is available in two editions:

  • Community Edition (CE) – This edition is suitable for individual developers and small teams exploring container-based applications.
  • Docker Enterprise Edition (EE) – This edition is suitable for enterprise development and IT teams who build, ship, and run critical business-critical applications in production at scale.

Docker Enterprise Edition has the following offering different capabilities.

  • Enterprise Edition Basic
  • Enterprise Edition Standard
  • Enterprise Edition Advanced

To understand which edition of Docker is applicable to you, refer to Overview of Docker Editions.

Click on one of the following to learn how to install Docker.

Installing Docker EE for:

Installing Docker EE

In this section, you will see how to get Docker EE for Ubuntu, RHEL, CentOS, and Oracle. It is recommended to ensure the respective prerequisites are met before Docker EE installation.

Get Docker EE for Ubuntu

To install Docker EE for Ubuntu using Docker’s repositories,

  1. Ensure the prerequisites are met.
  2. Uninstall older versions of Docker.
  3. Set up the repository.
  4. Install using the repository.

Get Docker EE for Red Hat Enterprise Linux (RHEL)

Red Hat Packet Manager (RPM)-based distributions such as RHEL, use a tool called YUM that work with your repositories to manage dependencies and provide automatic updates.

To install Docker EE for RHEL using the YUM repository,

  1. Ensure the prerequisites are met.
  2. Uninstall older versions of Docker.
  3. Set up the YUM repository.
  4. Install using the repository.

Get Docker EE for CentOS

To install Docker EE for CentOS using the YUM repository,

  1. Ensure the prerequisites are met.
  2. Uninstall older versions of Docker.
  3. Set up the YUM repository.
  4. Install using the repository.

Installing Docker CE

In this section, you will see how to install Docker CE for Ubuntu, and Centos.

Get Docker CE for Ubuntu

To install Docker CE for Ubuntu using the Yum repository

  1. Ensure the prerequisites are met.
  2. Uninstall older versions of Docker.
  3. Set up the YUM repository.
  4. Install using the repository.

Get Docker CE for CentOS

To install Docker CE for CentOS using the Yum repository

  1. Ensure the prerequisites are met.
  2. Uninstall older versions of Docker.
  3. Set up the YUM repository.
  4. Install using the repository.

Selecting a Storage Driver for Docker

Docker supports several storage drivers, using a pluggable architecture. The storage driver controls how images and containers are stored and managed on your Docker host. Docker advises a storage driver for production environments, and documents their operation and merits here.

To understand your driver choices, refer to Supported storage drivers per Linux distribution.

Devicemapper

Device Mapper is a kernel-based framework that underpins many advanced volume management technologies on Linux. If you use Docker EE on RHEL, CentOS, or Oracle Linux, then a device mapper storage driver is mandatory. devicemapper is also supported on Docker CE running on CentOS, Fedora, Ubuntu, or Debian. Docker recommends that a device mapper be configured in direct-lvm-mode for production.

AUFS Overlay

  • For Docker CE, AUFS is supported on Ubuntu, and it is a default storage driver for Ubuntu. If your Linux kernel is version 4.7 or higher, and you use Docker CE, consider using overlay2.
  • AUFS cannot use aufs, btrfs, nor ecryptfs as a backing filesystems. This means that the filesystem which contains /var/lib/docker/aufs cannot be one of these filesystem types.
  • devicemapper is not recommended for Ubuntu. overlay2 can be used (if supported) or AUFS.

For more information on AUFS Overlay, refer to:

Verify Docker Installation and Version

Enter the docker version command to confirm the appropriate version is installed and running. In this example, the version is 1.8.1.:

docker version
Client:
Version: 1.8.1
API version: 1.20
Go version: go1.4.2
Git commit: d12ea79
Built: Thu Aug 13 02:35:49 UTC 2015
OS/Arch: linux/amd64
Server:
Version: 1.8.1
API version: 1.20
Go version: go1.4.2
Git commit: d12ea79
Built: Thu Aug 13 02:35:49 UTC 2015
OS/Arch: linux/amd64

Note: Docker local storage can be given at docker daemon start.  If we don’t specify storage at docker daemon start, docker picks up the default local storage based on underlying storage driver. For devicemapper - /var/lib/docker..etc. Avi Vantage 16.3 adds the requirement of 18 GB for running Avi containers.