Ahoy! Cast off with Docker on Oracle Linux

There's no need to upgrade to Oracle Linux 7 to start playing with Docker: we've built it for Oracle Linux 6 and the Unbreakable Enterprise Kernel Release 3 and released it into the addons channel on http://public-yum.oracle.com. This release of Docker uses the native libcontainers engine by default as well as supporting btrfs as the storage engine. 

If you've already got Oracle Linux 7 installed, don't worry we have you covered: we've released Docker for Oracle Linux 7 as well.


To install Docker on Oracle Linux 6:

  1. Enable the ol6_addons channel in /etc/yum.repos.d/public-yum-ol6.repo
  2. Run:
    # yum install docker

To install Docker on Oracle Linux 7:

  1. Enable the ol7_addons channel in /etc/yum.repos.d/public-yum-ol7.repo
  2. Run:
    # yum install docker

Enable btrfs support

Docker uses device-mapper devices as the default storage engine. To switch to using btrfs as the storage engine, ensure that /var/lib/docker is mounted on a btrfs filesystem. Check Chapter 5 of the Oracle Linux Administrator's Solutions Guide for more details on how to create and mount btrfs filesystems.

To enable btrfs support for Docker on Oracle Linux:

  1. Ensure that /var/lib/docker is on a btrfs filesystem
  2. Edit /etc/sysconfig/docker and add "-s btrfs" to the other_args fields.
  3. Restart the Docker daemon:
    # service docker restart

Enabling and starting Docker

To enable the Docker daemon on system boot and start Docker on OL6:

# chkconfig docker on

# service docker start

To enable the Docker daemon on system boot and start Docker on OL7:

# systemctl enable docker.service

# systemctl start docker.service

Checking Docker status

To check that Docker is up and running on OL6:

# service docker status

To check that Docker is up and running on OL7:

# systemctl status docker.service

You can also get more information from Docker itself:

# docker info

# docker version

Once you have Docker up and running, follow the upstream Docker documentation to get started. 

Known Issues

Docker unmounts btrfs filesystems on shutdown

If you're running Docker using the btrfs storage engine and you stop the Docker service, it will unmount the btrfs filesystem during the shutdown process. You should ensure the filesystem is mounted properly prior to restarting the Docker service. On Oracle Linux 7, you can use a systemd.mount definition and modify the Docker systemd.service to depend on the btrfs mount defined in systemd.

SElinux support with btrfs on Oracle Linux 7

SElinux must be set to Permissive or Disabled in order to use the btrfs storage engine on Oracle Linux 7.


Why does installing docker on OL 7 require the kernel-uek?

Posted by guest5000 on August 29, 2014 at 10:54 AM PDT #

We require kernel-uek for production btrfs support. Currently, our upstream distribution still considers btrfs a tech preview in their kernel, while we consider it production ready in ours. So, to ensure that you have full support of Docker on btrfs, we require the UEK3 on both OL6 and OL7.

Posted by Avi Miller on August 29, 2014 at 02:05 PM PDT #

Avi - thanks for the info.

Posted by guest5000 on September 02, 2014 at 12:04 PM PDT #

Avi - another question: we do not plan on deploying OL 7 with the UEK kernel and do not desire to install or update that kernel. Arguments for or against the UEK kernel aside - is there a way to install docker on Oracle Linux without installing the UEK? I ask this because we don't have any reason or intention to use BTRFS.

Posted by guest5000 on September 02, 2014 at 12:09 PM PDT #

The Oracle-supported Docker package requires that the UEK3 (or higher version, eventually) be installed. However, there's no check to ensure that you're booted into it. If you absolutely don't want the UEK installed at all, you could install the docker-io package from EPEL, but you wouldn't receive any support from Oracle for it.

Posted by Avi Miller on September 02, 2014 at 01:37 PM PDT #

After a quick look at the addons repo I only found a version 0.11.x, while the upstream Docker release is already at 1.2.0. Searching in the EPEL 6 repo at https://apps.fedoraproject.org/packages/docker-io/overview/ I found 1.1.2 (latest) and 1.2.0 (testing). Do you plan to sync the addons repo with a more recent release?

Posted by guest on September 12, 2014 at 01:52 AM PDT #

We are shipping the same version of Docker as our upstream distribution. Oracle doesn't provide ETAs on updates, but this is something we're investigating.

Posted by Avi Miller on September 12, 2014 at 01:55 AM PDT #

Version 1.2.0 from epel testing works really well on our OEL 6.4 with UEK 3. What is Oracles stance on running software from epel? The Docker version in the Orcle YUM repo is just too old.

Posted by guest on September 12, 2014 at 02:22 AM PDT #

You can run the EPEL package if you want, but you won't get support for it from Oracle. You'll have to rely on upstream support.

Posted by Avi Miller on September 12, 2014 at 03:08 AM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed

Get the latest updates on strategy, products, events, news, customers, partners and all things Oracle Linux! Connect with Oracle's Linux experts.

Stay Connected




« July 2016