KAFKA-19501 Update OpenJDK base image from buster to bullseye (#20165)
CI / build (push) Has been cancelled Details

The changes update the OpenJDK base image from 17-buster to 17-bullseye:
- Updates tests/docker/Dockerfile to use openjdk:17-bullseye instead of
openjdk:17-buster
  - Updates tests/docker/ducker-ak script to use the new default image
- Updates documentation in tests/README.md with the new image name
examples

Reviewers: Federico Valeri <fedevaleri@gmail.com>, TengYao Chi
<kitingiao@gmail.com>, Ken Huang <s7133700@gmail.com>, Chia-Ping Tsai
<chia7712@gmail.com>
This commit is contained in:
Tsung-Han Ho (Miles Ho) 2025-07-17 03:27:07 +08:00 committed by Chia-Ping Tsai
parent 12e695e298
commit 74d93adadb
3 changed files with 12 additions and 8 deletions

View File

@ -49,12 +49,13 @@ TC_PATHS="tests/kafkatest/tests/streams/streams_upgrade_test.py::StreamsUpgradeT
``` ```
* Run tests with a specific image name * Run tests with a specific image name
``` ```
image_name="ducker-ak-openjdk:17-buster" bash tests/docker/run_tests.sh image_name="ducker-ak-openjdk:17" bash tests/docker/run_tests.sh
``` ```
* Run tests with a different JVM * Run tests with a different JVM
``` ```
bash tests/docker/ducker-ak up -j 'openjdk:17-buster'; tests/docker/run_tests.sh bash tests/docker/ducker-ak up -j '<JDK_IMAGE>'; tests/docker/run_tests.sh
``` ```
You can customize the OpenJDK base image using the `-j` or `--jdk` parameter, otherwise a default value will be used.
* Remove ducker-ak containers * Remove ducker-ak containers
``` ```
bash tests/docker/ducker-ak down -f bash tests/docker/ducker-ak down -f

View File

@ -13,9 +13,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
# The base image of openjdk:17 is typically oraclelinux:8-slim, which doesn't include apt-get. ARG jdk_version
# Therefore, use openjdk:17-buster instead.
ARG jdk_version=openjdk:17-buster
FROM $jdk_version AS build-native-image FROM $jdk_version AS build-native-image
WORKDIR /build WORKDIR /build

View File

@ -45,7 +45,9 @@ docker_run_memory_limit="2000m"
default_num_nodes=14 default_num_nodes=14
# The default OpenJDK base image. # The default OpenJDK base image.
default_jdk="openjdk:17-buster" # The base image of openjdk:17 is typically oraclelinux:8-slim, which doesn't include apt-get.
# Therefore, use openjdk:17-bullseye instead.
default_jdk="openjdk:17-bullseye"
# The default ducker-ak image name. # The default ducker-ak image name.
default_image_name="ducker-ak" default_image_name="ducker-ak"
@ -70,7 +72,7 @@ help|-h|--help
Display this help message Display this help message
up [-n|--num-nodes NUM_NODES] [-f|--force] [docker-image] up [-n|--num-nodes NUM_NODES] [-f|--force] [docker-image]
[-C|--custom-ducktape DIR] [-e|--expose-ports ports] [-C|--custom-ducktape DIR] [-e|--expose-ports ports] [-j|--jdk JDK_VERSION]
Bring up a cluster with the specified amount of nodes (defaults to ${default_num_nodes}). Bring up a cluster with the specified amount of nodes (defaults to ${default_num_nodes}).
The docker image name defaults to ${default_image_name}. If --force is specified, we will The docker image name defaults to ${default_image_name}. If --force is specified, we will
attempt to bring up an image even some parameters are not valid. attempt to bring up an image even some parameters are not valid.
@ -83,7 +85,10 @@ up [-n|--num-nodes NUM_NODES] [-f|--force] [docker-image]
on the host. The argument can be a single port (like 5005), a port range like (5005-5009) on the host. The argument can be a single port (like 5005), a port range like (5005-5009)
or a combination of port/port-range separated by comma (like 2181,9092 or 2181,5005-5008). or a combination of port/port-range separated by comma (like 2181,9092 or 2181,5005-5008).
By default no port is exposed. See README.md for more detail on this option. By default no port is exposed. See README.md for more detail on this option.
If -j|--jdk is specified, you can customize the OpenJDK base image used for building
the ducker container. Defaults to ${default_jdk}. Example: -j openjdk:17-bullseye
Note that port 5678 will be automatically exposed for ducker01 node and will be mapped to 5678 Note that port 5678 will be automatically exposed for ducker01 node and will be mapped to 5678
on your local machine to enable debugging in VS Code. on your local machine to enable debugging in VS Code.