Skip to content

Commit 74d93ad

Browse files
dalaoqichia7712
authored andcommitted
KAFKA-19501 Update OpenJDK base image from buster to bullseye (apache#20165)
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>
1 parent 12e695e commit 74d93ad

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

tests/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,13 @@ TC_PATHS="tests/kafkatest/tests/streams/streams_upgrade_test.py::StreamsUpgradeT
4949
```
5050
* Run tests with a specific image name
5151
```
52-
image_name="ducker-ak-openjdk:17-buster" bash tests/docker/run_tests.sh
52+
image_name="ducker-ak-openjdk:17" bash tests/docker/run_tests.sh
5353
```
5454
* Run tests with a different JVM
5555
```
56-
bash tests/docker/ducker-ak up -j 'openjdk:17-buster'; tests/docker/run_tests.sh
56+
bash tests/docker/ducker-ak up -j '<JDK_IMAGE>'; tests/docker/run_tests.sh
5757
```
58+
You can customize the OpenJDK base image using the `-j` or `--jdk` parameter, otherwise a default value will be used.
5859
* Remove ducker-ak containers
5960
```
6061
bash tests/docker/ducker-ak down -f

tests/docker/Dockerfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515

16-
# The base image of openjdk:17 is typically oraclelinux:8-slim, which doesn't include apt-get.
17-
# Therefore, use openjdk:17-buster instead.
18-
ARG jdk_version=openjdk:17-buster
16+
ARG jdk_version
1917
FROM $jdk_version AS build-native-image
2018

2119
WORKDIR /build

tests/docker/ducker-ak

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ docker_run_memory_limit="2000m"
4545
default_num_nodes=14
4646

4747
# The default OpenJDK base image.
48-
default_jdk="openjdk:17-buster"
48+
# The base image of openjdk:17 is typically oraclelinux:8-slim, which doesn't include apt-get.
49+
# Therefore, use openjdk:17-bullseye instead.
50+
default_jdk="openjdk:17-bullseye"
4951

5052
# The default ducker-ak image name.
5153
default_image_name="ducker-ak"
@@ -70,7 +72,7 @@ help|-h|--help
7072
Display this help message
7173
7274
up [-n|--num-nodes NUM_NODES] [-f|--force] [docker-image]
73-
[-C|--custom-ducktape DIR] [-e|--expose-ports ports]
75+
[-C|--custom-ducktape DIR] [-e|--expose-ports ports] [-j|--jdk JDK_VERSION]
7476
Bring up a cluster with the specified amount of nodes (defaults to ${default_num_nodes}).
7577
The docker image name defaults to ${default_image_name}. If --force is specified, we will
7678
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]
8385
on the host. The argument can be a single port (like 5005), a port range like (5005-5009)
8486
or a combination of port/port-range separated by comma (like 2181,9092 or 2181,5005-5008).
8587
By default no port is exposed. See README.md for more detail on this option.
86-
88+
89+
If -j|--jdk is specified, you can customize the OpenJDK base image used for building
90+
the ducker container. Defaults to ${default_jdk}. Example: -j openjdk:17-bullseye
91+
8792
Note that port 5678 will be automatically exposed for ducker01 node and will be mapped to 5678
8893
on your local machine to enable debugging in VS Code.
8994

0 commit comments

Comments
 (0)