Monday Aug 25, 2014

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.

Installation

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.

About

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

Stay Connected

Twitter


Facebook

Search

Archives
« August 2014 »
SunMonTueWedThuFriSat
     
2
3
5
6
7
9
10
11
12
13
14
16
17
18
21
23
24
27
28
30
31
      
Today