Creating the Anjuna Docker Images

The Anjuna Nitro K8s Toolset consists of three components, each with its own Docker image.
Refer to Anjuna Nitro for EKS Overview for more information.

Before building the Docker images, you need to determine the version of your Anjuna Nitro K8s Toolset and set an environment variable for it:

$ export ANJUNA_VERSION=$(grep appVersion helm-charts/anjuna-tools/Chart.yaml | cut -f2 -d" " | cut -f2 -d'"')

Create another environment variable in which to store your Docker registry URL:

$ export DOCKER_REGISTRY=[your Docker registry URL]

For example,

$ export DOCKER_REGISTRY=[account_id].dkr.ecr.[region].amazonaws.com

After you set the environment variables, you need to choose whether to use the Docker images for the Anjuna K8s Toolset pre-built by Anjuna or build the Docker images on your own.
You may want to build the Docker images on your own when:

  • You want to control the contents of the images

  • You want to change the base image (to RHEL, for example)

If you wish to use the pre-built Docker images provided by Anjuna, follow the Load the Pre-built Docker Images section just below.
Otherwise, follow the Build the Docker Images section below. After you load or build the Docker images, you will need to push them. Follow the Push the Docker Images section.

Load the Pre-built Docker Images

Load the pre-built Docker images to your Docker environment:

$ docker load --input docker/tar/anjuna-device-manager.tar
$ docker load --input docker/tar/anjuna-nitro-launcher.tar
$ docker load --input docker/tar/anjuna-nitro-webhook.tar

Tag the Docker images with your Docker registry:

$ docker tag "anjuna-device-manager:${ANJUNA_VERSION}" \
      "${DOCKER_REGISTRY}/anjuna-device-manager:${ANJUNA_VERSION}"
$ docker tag "anjuna-nitro-launcher:${ANJUNA_VERSION}" \
      "${DOCKER_REGISTRY}/anjuna-nitro-launcher:${ANJUNA_VERSION}"
$ docker tag "anjuna-nitro-webhook:${ANJUNA_VERSION}" \
      "${DOCKER_REGISTRY}/anjuna-nitro-webhook:${ANJUNA_VERSION}"

Build the Docker Images

Extract the Anjuna Nitro Webhook binary:

$ tar --directory docker/specs/webhook \
      --extract --strip-components 2 \
      --file docker/specs/launcher/artifacts.tar \
      ./bin/anjuna-k8s-nitro-webhook

Extract the Anjuna Device Manager binary:

$ tar --directory docker/specs/device-manager \
      --extract --strip-components 3 \
      --file docker/specs/launcher/artifacts.tar \
      ./k8s/bin/

Build the Docker images:

$ docker build docker/specs/webhook \
      --no-cache \
      --file docker/specs/webhook/Dockerfile \
      --tag "${DOCKER_REGISTRY}/anjuna-nitro-webhook:${ANJUNA_VERSION}"
$ docker build docker/specs/launcher \
      --no-cache \
      --file docker/specs/launcher/Dockerfile \
      --tag "${DOCKER_REGISTRY}/anjuna-nitro-launcher:${ANJUNA_VERSION}"
$ docker build docker/specs/device-manager \
      --no-cache \
      --file docker/specs/device-manager/Dockerfile \
      --tag "${DOCKER_REGISTRY}/anjuna-device-manager:${ANJUNA_VERSION}"

Push the Docker Images

Push the Docker images to your Docker registry:

$ docker push "${DOCKER_REGISTRY}/anjuna-nitro-webhook:${ANJUNA_VERSION}"
$ docker push "${DOCKER_REGISTRY}/anjuna-nitro-launcher:${ANJUNA_VERSION}"
$ docker push "${DOCKER_REGISTRY}/anjuna-device-manager:${ANJUNA_VERSION}"
The repositories must be created in the container registry.