In a previous blog, Honglin went through the process of installing Oracle Container Runtime for Docker on Oracle Linux 7.
I will use the approach to install it on an Oracle Linux 7 VM running on Oracle Private Cloud Appliance. Further, I will pull Oracle Weblogic Server and Oracle Tuxedo container images from Oracle Container Registry.
- Download the Oracle Virtual Appliance for Oracle Linux 7
Import the downloaded templates to the repository on PCA by following these steps:
- Click on Repositories
- Select the desired repository, then choose Virtual Appliances
- Click on ‘Import Virtual Appliance’ (button). Enter the URL for the Virtual Appliance location
- Check ‘Create VM’ box and select the desired server pool for the VM to be created
- Click OK
Fig1: Importing a Virtual Appliance
- Edit the newly created VM
The step above will create a VM in the specified server pool. The newly created VM needs to have a VNIC on the public network, so that it can reach yum in order to install Oracle Container Runtime for Docker. Here’s how you do it:
- Go to ‘Servers and VMs’ tab and select the Server Pool that has the newly created VM
- Choose the ‘Virtual Machines’ perspective and select the VM
- Click on ‘Edit Virtual Machine’ (button). You may also change the name of this VM if you like.
- In the ‘Networks’ tab, add a VNIC to the public VLAN with DHCP enabled (vm_public_313 in the screenshot below).
- Click OK
Fig 2: Edit the VM
- Start the VM and set up First Boot Configuration
On starting the VM for the first time, you are prompted for the First Boot configuration input.
- Start the VM using the and then connect to the VM Console using ‘Launch Console’ (button)
- Enter the network interface name, boot protocol and root password
- Then login using the root password
Fig 3: First Boot Setup
- Install Oracle Container Runtime for Docker using yum
We will be using the Oracle Linux yum server to install the required packages to set up Oracle Container Runtime for Docker.
- Update the Oracle Linux 7 system to the latest yum settings by running:[root@localhost ~] yum update
Note: This step is important to get the latest yum repo files. See blog for details
Fig 4: Getting the latest kernel using yum update
- Enable ol7_addons yum channel in order to be able to install docker-engine package using yum. yum-config-manager command can be used to enable a yum channel on Oracle Linux systems.
[root@localhost ~] yum-config-manager --enable ol7_addons
- Then you simply use yum to start the installation:
[root@localhost ~] yum install docker-engine
Fig 5: Installing Oracle Container Runtime for Docker using yum
- Set up Storage for Docker Filesystem
The Docker Engine is configured to use overlay2 as the default storage driver to manage Docker containers. This allows Docker to function on a default Oracle Linux 7 system without any additional configuration required, immediately after install. However, this configuration is not recommended for production environments. Performance and scalability can be compromised by this configuration. Therefore, it is important to consider using dedicated storage for Docker filesystem and use docker-storage-config tool to enable it. Read the Oracle Container Runtime for Docker User's Guide for details on how to set it up.
- Start the Docker Service after installation is complete
[root@localhost ~] systemctl start docker
[root@localhost ~] systemctl enable docker
Fig 6: Docker service running
7. Use Oracle Container Registry to pull the Docker images
Oracle Container Registry is the trusted source of Oracle software as Docker containers.
- Login to the Oracle Container Registry Web UI at https://container-registry.oracle.com/ and accept the terms and conditions for the images you want to pull - Oracle Weblogic and Oracle Tuxedo in this case.
- Login to the Oracle Container registry and then use docker pull to pull the latest Oracle Weblogic and Oracle Tuxedo images.
Fig 7: Using docker pull to pull the Oracle Weblogic and Oracle Tuxedo images
Fig 8: Available images
We have successfully installed Oracle Container Runtime for Docker in an Oracle Linux 7 Virtual Machine on Oracle Private Cloud Appliance. For details on deploying Oracle Weblogic in Docker containers, refer to this blog.
For more details about Oracle Container Runtime for Docker, follow the User's Guide.