The software described in this documentation is either no longer supported or is in extended support.
Oracle recommends that you upgrade to a current supported release.

Oracle® Linux 6

Docker User's Guide

Oracle Legal Notices
Oracle Documentation License

E75728-09

January 2019


Table of Contents

Preface
1 About Docker
1.1 Notable Updates
2 Installing and Upgrading Docker
2.1 Installing and Configuring the Docker Engine on Oracle Linux 6
2.2 Upgrading Docker
3 Docker Administration and Configuration
3.1 Reloading or Restarting the Docker Engine
3.2 Enabling Non-root Users to Run Docker Commands
3.3 Configuring User Namespace Remapping
4 Working with Containers and Images
4.1 Pulling Oracle Linux Images from the Docker Hub
4.1.1 Enabling or Disabling Docker Content Trust
4.2 Creating and Running Docker Containers
4.2.1 Configuring How Docker Restarts Containers
4.2.2 Controlling Capabilities and Making Host Devices Available to Containers
4.2.3 Accessing the Host's Process ID Namespace
4.2.4 Mounting a Host's root File System in Read-Only Mode
4.3 Creating a Docker Image from an Existing Container
4.4 Creating a Docker Image from a Dockerfile
4.5 About Docker Networking
4.5.1 About Multihost Networking
4.6 Communicating Between Docker Containers
4.6.1 Example of Linking Database and HTTP Server Containers
4.7 Accessing External Files from Docker Containers
4.8 Creating and Using Data Volume Containers
4.9 Moving Data Between Docker Containers and the Host
4.10 Using Labels to Define Metadata
4.11 Defining the Logging Driver
4.12 About Image Digests
4.13 Specifying Control Groups for Containers
4.14 Limiting CPU Usage by Containers
4.15 Making a Container Use the Host's UTS Namespace
4.16 Setting ulimit Values on Containers
4.17 Building Images with Resource Constraints
4.18 Committing, Exporting and Importing Images
5 Docker Registry
5.1 Using the Oracle Container Registry
5.2 Setting up a local Docker Registry Server
5.3 Importing images into the local Docker Registry
6 Docker Swarm
6.1 Swarm Management
6.1.1 Initialize the swarm on a host selected as the management node
6.1.2 Add nodes to the swarm
6.1.3 Verify that the nodes have been added to the swarm
6.1.4 Promoting nodes to manager status
6.1.5 Removing nodes
6.1.6 Recovering quorum in a swarm
6.2 Service Management
6.2.1 Creating a service and deploying containers
6.2.2 Adding or removing container instances
7 For More Information About Docker