From d8bfbb7d1a1c262b93d40d8d582a96b21ba30e7d Mon Sep 17 00:00:00 2001 From: Ken Huang Date: Sat, 16 Nov 2024 00:52:59 +0800 Subject: [PATCH] KAFKA-17791: Dockerfile should use requirements.txt for dependencies (#17542) Reviewers: Mickael Maison --- tests/docker/Dockerfile | 3 ++- tests/docker/requirements.txt | 25 +++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 tests/docker/requirements.txt diff --git a/tests/docker/Dockerfile b/tests/docker/Dockerfile index 9ed8a8c1f18..d3aae062926 100644 --- a/tests/docker/Dockerfile +++ b/tests/docker/Dockerfile @@ -65,7 +65,8 @@ LABEL ducker.creator=$ducker_creator RUN apt update && apt install -y sudo git netcat iptables rsync unzip wget curl jq coreutils openssh-server net-tools vim python3-pip python3-dev libffi-dev libssl-dev cmake pkg-config libfuse-dev iperf traceroute iproute2 iputils-ping && apt-get -y clean RUN python3 -m pip install -U pip==21.1.1; # NOTE: ducktape 0.12.0 supports py 3.9, 3.10, 3.11 and 3.12 -RUN pip3 install --upgrade cffi virtualenv pyasn1 boto3 pycrypto pywinrm ipaddress enum34 debugpy psutil && pip3 install --upgrade "ducktape==0.12.0" +COPY requirements.txt requirements.txt +RUN pip3 install --upgrade -r requirements.txt COPY --from=build-native-image /build/kafka-binary/ /opt/kafka-binary/ # Set up ssh diff --git a/tests/docker/requirements.txt b/tests/docker/requirements.txt new file mode 100644 index 00000000000..91eaae441b4 --- /dev/null +++ b/tests/docker/requirements.txt @@ -0,0 +1,25 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +cffi +virtualenv +pyasn1 +boto3 +pycrypto +pywinrm +ipaddress +debugpy +psutil +ducktape==0.12.0 \ No newline at end of file