Skip to content

strimzi/test-container-images

License Twitter Follow

Test container images

This repository contains code to compile the image used in the strimzi/test-container repository. The overall workflow is that if a new version of Apache Kafka® is published using build_pipeline, we release a brand new image with Kafka version containing Kafka binaries. Moreover, the image can be used in other forms of deployment using a classic docker container or docker-compose.

How to use

Pulling images can be achieved with following command:

docker pull strimzi-test-container/test-container:<test-container-image-version>-kafka-<kafka-version>

example:

// download image with the 0.1.0 version and Kafka 3.0.0
docker pull strimzi-test-container/test-container:0.1.0-kafka-3.0.0

How the image is built

The build process is divided into 3 phases:

  1. Download Kafka binaries
  2. Next, we build for each Kafka version the same image but with different tag (i.e., test-container:latest-kafka-3.0.0, test-container:latest-kafka-2.8.1)
docker build --build-arg version=$DOCKER_VERSION_ARG --build-arg KAFKA_VERSION=$KAFKA_VERSION --build-arg SCALA_VERSION=$SCALA_VERSION -t strimzi/$PROJECT_NAME:$CURRENT_TAG $DOCKERFILE_DIR
  1. Eventually, we tag this image and then push it into the container repository
// tag image
docker tag strimzi/$PROJECT_NAME:$CURRENT_TAG $REGISTRY/$REGISTRY_ORGANIZATION/$PROJECT_NAME:$CURRENT_TAG
// push image
docker push $REGISTRY/$REGISTRY_ORGANIZATION/$PROJECT_NAME:$CURRENT_TAG