Option 2: Build the TimesTen Container Image
The following example assumes you want to build a TimesTen container image from a TimesTen distribution. If instead you want to use an official TimesTen container image located on Oracle Container Registry, see Option 1: Use the Official TimesTen Container Images.
The base image used in this Dockerfile is container-registry.oracle.com/os/oraclelinux:8
. The Dockerfile supports a number of ARGs that let you override various attributes of the TimesTen container image. For example, you can specify a custom TimesTen user and TimesTen users group to run TimesTen instead of using the default timesten
user and the default timesten
group. You can also specify which TimesTen release to embed in the TimesTen container image. For the supported Dockerfile ARGs, see Dockerfile ARGs.
Unpack the TimesTen and the TimesTen Operator Distributions
To unpack the TimesTen distribution and the TimesTen Operator distribution, complete the following steps:
You successfully unpacked the TimesTen and TimesTen Operator distributions.
Copy the TimesTen Distribution
The files that you need to build the TimesTen container image are provided in the unzipped TimesTen Operator distribution. In this example, the directory that contains the unzipped TimesTen Operator distribution is kube_files
. See Unpack the TimesTen and the TimesTen Operator Distributions.
To build the TimesTen container image, complete the following steps:
kube_files/image
directory and created the image pull secret.
Choose How to Build
You can choose to build the TimesTen image with the defaults specified in Dockerfile ARGs or you can choose to customize the TimesTen container image by overriding the defaults specified in Dockerfile ARGs.
Option 2a: Build with Defaults
The following example assumes you want to build the TimesTen container image with the defaults specified in Dockerfile ARGs.
Note:
To reduce the size of the final TimesTen container image, the Dockerfile uses a multi-stage build. This results in a dangling image left behind. To locate dangling images, use thedocker
command with the -f
filter flag with a value of dangling=true
. Once you locate the dangling image, you can use the docker
image
prune
command to remove it. For example, docker images -f dangling=true
docker image prune
You successfully built the TimesTen container image. It is pushed to your image registry. Proceed to About Deploying the TimesTen Operator to deploy the TimesTen Operator.
Option 2b: Build with Customizations
The following example assumes you want to customize the TimesTen container image by overriding the defaults specified in Dockerfile ARGs. If you instead want to use these defaults, see Option 2a: Build with Defaults.
This example creates a custom TimesTen user and a custom TimesTen users group to run TimesTen in the TimesTen containers.
Note:
To reduce the size of the final TimesTen container image, the Dockerfile uses a multi-stage build. This results in a dangling image left behind. To locate dangling images, use thedocker
command with the -f
filter flag with a value of dangling=true
. Once you locate the dangling image, you can use the docker
image
prune
command to remove it. For example, docker images -f dangling=true
docker image prune
You successfully built the TimesTen container image. It is pushed to your image registry. Proceed to About Deploying the TimesTen Operator to deploy the TimesTen Operator.