Option 3: Use a Container Registry of Your Choice

Task 1: Configure Your Development Host and Kubernetes Cluster

Let's choose repo.visioncorp.com for the registry of choice.

  1. On your development host, use the docker login command to log in to your repo.visioncorp.com container registry. At the prompt, enter your credentials for your container registry.
    docker login repo.visioncorp.com

    The docker login operation creates or updates the $HOME/.docker/config.json file with the auth token you provided when you were prompted for your password.

  2. On your development host, create a Kubernetes Secret.

    A Kubernetes Secret takes a copy of your credentials from the docker login command and makes them available to your Kubernetes cluster.

    This example creates a Secret called sekret.

    kubectl create secret generic sekret \
    --from-file=.dockerconfigjson=$HOME/.docker/config.json \
    --type=kubernetes.io/dockerconfigjson

    Note:

    Save the name of the Kubernetes Secret. You need it later.

    For more information, see Pulling Images from Registry during Deployment in the Kubernetes documentation.

Task 2: Tag and Push Container Image to Container Registry

Let's use the container image you built in Option 3: Build a Container Image. In the example, the name of the image is ttimage:22.1.1.27.0.
  1. On your development host, tag the TimesTen container image.
    docker tag ttimage:22.1.1.27.0 repo.visioncorp.com:ttimage22.1.1.27.0
  2. Push the TimesTen container image to your container registry.
    docker push repo.visioncorp.com:ttimage22.1.1.27.0

    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 the docker 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. This example removes all dangling images.
    docker images -f dangling=true
    docker image prune

Congratulations! You successfully tagged and pushed a TimesTen container image to a registry of your choice.

Next Steps

Proceed to Part 3: Obtain TimesTen YAML Manifest Files and Helm Charts.