13 Building Your Own Images

You can build your own images of Oracle Communications Offline Mediation Controller using the guidance provided in this chapter.

The Docker build commands in this chapter reference Dockerfile and related scripts as is from the oc-cn-ocomc-docker-files-15.0.0.x.0.tgz package. Ensure that you use your own version of Dockerfile and related scripts before running the build command.

Sample Dockerfiles included in the Offline Mediation Controller cloud native deployment package (oc-cn-ocomc-docker-files-15.0.0.x.0.tgz) are examples that depict how default images are built for Offline Mediation Controller. If you want to build your own images, refer to the sample Dockerfiles shipped with the product as a reference. Create your own Dockerfiles and then build your images.

Caution:

The Dockerfiles and related scripts are provided for reference only. You can refer to them to build or extend your own Docker images. Support is restricted to core product issues only and no support will be provided for custom Dockerfiles and scripts.

Building Offline Mediation Controller Images

To build images for Offline Mediation Controller, unpack oc-cn-ocomc-docker-files-15.0.0.x.0.tgz to create the directory structure in docker_files/.

Building your own Offline Mediation Controller images involves these high-level steps:

  1. You build the Offline Mediation Controller base image. See "Building the Offline Mediation Controller Base Image".

  2. You build custom images for Offline Mediation Controller. See "Building Your Offline Mediation Controller Image".

Building the Offline Mediation Controller Base Image

All images from the Offline Mediation Controller cloud native deployment package use Oracle Linux, JDK 1.8, and a few utilities as the base image. Oracle Linux is available from Oracle Container Registry (http://container-registry.oracle.com). You can pull the image from it. To build the base Offline Mediation Controller image, do this:

  1. Extract the Docker file package (oc-cn-ocomc-docker-files-15.0.0.x.0.tgz).

    tar xvzf oc-cn-ocomc-docker-files-15.0.0.x.0.tgz
  2. Place the jdk*.tar.gz in the docker_files/jdk/ directory.

  3. Build the Offline Mediation Controller base image by entering this command from the docker_files/jdk/ directory:

    docker build -t oc-cn-oraclelinuxjdk:15.0.0.x.0 -f Dockerfile.jdk --build-arg PROXY=ProxyHost:Port .

    For example:

    docker build -t oc-cn-oraclelinuxjdk:15.0.0.x.0 -f Dockerfile.jdk --build-arg PROXY=http://www-proxy.example.com:80 .

Building Your Offline Mediation Controller Image

To build your Offline Mediation Controller image:

  1. Update the Offline Mediation Controller base image (oc-cn-oraclelinuxjdk:15.0.0.x.0) in the docker_files/OCOMC/Dockerfile directory.

  2. Move the Offline Mediation Controller 15.0.0.x.0 package (OCOMC-15.0.0.x.0_generic_full.jar) to the docker_files/OCOMC/container-scripts directory.

  3. Build the Offline Mediation Controller image by entering this command from the docker_files/OCOMC/ directory:

    docker build -t Image:Tag -f Dockerfile .

    For example:

    docker build -t oc-cn-ocomc:15.0.0.x.0 -f Dockerfile .
  4. Tag and push the image to your private registry server, if required.