There are two ways to install and upgrade :ref:`Docker Enterprise<docker-engine-enterprise> on Oracle Linux:
This section lists what you need to consider before installing Docker EE. Items that require action are explained below.
devicemapper
storage driver only (direct-lvm
mode in
production)./etc/yum.repos.d/
.Docker Engine - Enterprise supports Oracle Linux 64-bit, versions 7.3 and higher, running the Red Hat Compatible kernel (RHCK) 3.10.0-514 or higher. Older versions of Oracle Linux are not supported.
On Oracle Linux, Docker Engine - Enterprise only supports the
devicemapper
storage driver. In production, you must use it in
direct-lvm
mode, which requires one or more dedicated block devices.
Fast storage such as solid-state media (SSD) is recommended.
To install Docker EE, you will need the URL of the Docker EE repository associated with your trial or subscription:
You will use this URL in a later step to create a variable called,
DOCKERURL
.
The Docker Engine - Enterprise package is called docker-ee
. Older
versions were called docker
or docker-engine
. Uninstall all
older versions and associated dependencies. The contents of
/var/lib/docker/
are preserved, including images, containers,
volumes, and networks.
$ sudo yum remove docker \
docker-engine \
docker-engine-selinux
The advantage of using a repository from which to install Docker Engine - Enterprise (or any software) is that it provides a certain level of automation. RPM-based distributions such as Oracle Linux, use a tool called YUM that work with your repositories to manage dependencies and provide automatic updates.
You only need to set up the repository once, after which you can install Docker Engine - Enterprise from the repo and repeatedly upgrade as necessary.
Remove existing Docker repositories from /etc/yum.repos.d/
:
$ sudo rm /etc/yum.repos.d/docker*.repo
Temporarily store the URL (that you copied
above) in an environment variable.
Replace <DOCKER-EE-URL>
with your URL in the following command.
This variable assignment does not persist when the session ends:
$ export DOCKERURL="<DOCKER-EE-URL>"
Store the value of the variable, DOCKERURL
(from the previous
step), in a yum
variable in /etc/yum/vars/
:
$ sudo -E sh -c 'echo "$DOCKERURL/oraclelinux" > /etc/yum/vars/dockerurl'
Install required packages: yum-utils
provides the
yum-config-manager utility, and device-mapper-persistent-data
and lvm2
are required by the devicemapper storage driver:
$ sudo yum install -y yum-utils \
device-mapper-persistent-data \
lvm2
Enable the ol7_addons
Oracle repository. This ensures access to
the container-selinux
package required by docker-ee
.
$ sudo yum-config-manager --enable ol7_addons
Add the Docker Engine - Enterprise stable repository:
$ sudo -E yum-config-manager \
--add-repo \
"$DOCKERURL/oraclelinux/docker-ee.repo"
Install the latest patch release, or go to the next step to install a specific version:
$ sudo yum -y install docker-ee docker-ee-cli containerd.io
If prompted to accept the GPG key, verify that the fingerprint
matches 77FE DA13 1A83 1D29 A418 D3E8 99E5 FF2E 7668 2BC9
, and if so, accept it.
To install a specific version of Docker Engine - Enterprise (recommended in production), list versions and install:
List and sort the versions available in your repo. This example sorts results by version number, highest to lowest, and is truncated:
$ sudo yum list docker-ee --showduplicates | sort -r
docker-ee.x86_64 19.03.ee.2-1.el7.oraclelinuix docker-ee-stable-18.09
The list returned depends on which repositories you enabled, and is
specific to your version of Oracle Linux (indicated by
.el7
in this example).
Install a specific version by its fully qualified package name,
which is the package name (docker-ee
) plus the version string
(2nd column) starting at the first colon (:
), up to the first
hyphen, separated by a hyphen (-
). For example,
docker-ee-18.09.1
.
$ sudo yum -y install docker-ee-<VERSION_STRING> docker-ee-cli-<VERSION_STRING> containerd.io
For example, if you want to install the 18.09 version run the following:
sudo yum-config-manager --enable docker-ee-stable-18.09
Docker is installed but not started. The docker
group is created,
but no users are added to the group.
Start Docker:
Note
If using devicemapper
, ensure it is properly configured before
starting Docker.
$ sudo systemctl start docker
Verify that Docker Engine - Enterprise is installed correctly by
running the hello-world
image. This command downloads a test
image, runs it in a container, prints an informational message, and
exits:
$ sudo docker run hello-world
Docker Engine - Enterprise is installed and running. Use sudo
to
run Docker commands.
To manually install Docker Enterprise, download the
.rpm
file for your release. You need to
download a new file each time you want to upgrade Docker Enterprise.
Go to the Docker Engine - Enterprise repository URL associated with
your trial or subscription in your browser. Go to
oraclelinux/
. Choose your Oracle Linux
version, architecture, and Docker version. Download the
.rpm
file from the Packages
directory.
Install Docker Enterprise, changing the path below to the path where you downloaded the Docker package.
$ sudo yum install /path/to/package.rpm
Docker is installed but not started. The docker
group is created,
but no users are added to the group.
Start Docker:
Note
If using devicemapper
, ensure it is properly configured before
starting Docker.
$ sudo systemctl start docker
Verify that Docker Engine - Enterprise is installed correctly by
running the hello-world
image. This command downloads a test
image, runs it in a container, prints an informational message, and
exits:
$ sudo docker run hello-world
Docker Engine - Enterprise is installed and running. Use sudo
to
run Docker commands.
yum -y upgrade
instead of yum -y install
, and point to
the new file.Uninstall the Docker Engine - Enterprise package:
$ sudo yum -y remove docker-ee
Delete all images, containers, and volumes (because these are not automatically removed from your host):
$ sudo rm -rf /var/lib/docker
Delete other Docker related resources:
$ sudo rm -rf /run/docker
$ sudo rm -rf /var/run/docker
$ sudo rm -rf /etc/docker``
If desired, remove the devicemapper
thin pool and reformat the
block devices that were part of it.
You must delete any edited configuration files manually.