Skip to content

Commit 243a57c

Browse files
authored
Fixed alpine based docker container creation script (confluentinc#1963)
* Fixed alpine based docker container creation script * Fixed build due to older flake8 issue
1 parent 6dba537 commit 243a57c

File tree

3 files changed

+13
-15
lines changed

3 files changed

+13
-15
lines changed

examples/docker/Dockerfile.alpine

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# Alpine-based docker container with:
1919
# * Python3
2020
# * librdkafka (fully featured)
21-
# * kafkacat (withouth schema-registry/Avro support)
21+
# * kcat (withouth schema-registry/Avro support)
2222
# * confluent-kafka-python
2323
#
2424
# How to build (from confluent-kafka-python top-level directory):
@@ -30,13 +30,14 @@ FROM alpine:3.12
3030

3131
COPY . /usr/src/confluent-kafka-python
3232

33-
ENV LIBRDKAFKA_VERSION v2.8.0
34-
ENV KAFKACAT_VERSION master
33+
ENV LIBRDKAFKA_VERSION="v2.8.0"
34+
ENV KCAT_VERSION="master"
35+
ENV CKP_VERSION="master"
3536

3637

37-
ENV BUILD_DEPS git make gcc g++ curl pkgconfig bsd-compat-headers zlib-dev openssl-dev cyrus-sasl-dev curl-dev zstd-dev yajl-dev python3-dev
38+
ENV BUILD_DEPS="git make gcc g++ curl pkgconfig bsd-compat-headers zlib-dev openssl-dev cyrus-sasl-dev curl-dev zstd-dev yajl-dev python3-dev"
3839

39-
ENV RUN_DEPS bash libcurl cyrus-sasl-gssapiv2 ca-certificates libsasl heimdal-libs krb5 zstd-libs zstd-static yajl python3 py3-pip
40+
ENV RUN_DEPS="bash libcurl cyrus-sasl-gssapiv2 ca-certificates libsasl heimdal-libs krb5 zstd-libs zstd-static yajl python3 py3-pip"
4041

4142
RUN \
4243
apk update && \
@@ -56,25 +57,25 @@ RUN \
5657
rm -rf /usr/src/librdkafka
5758

5859
RUN \
59-
echo Installing kafkacat && \
60-
mkdir -p /usr/src/kafkacat && \
61-
cd /usr/src/kafkacat && \
62-
curl -LfsS https://github.com/edenhill/kafkacat/archive/${KAFKACAT_VERSION}.tar.gz | \
60+
echo Installing kcat && \
61+
mkdir -p /usr/src/kcat && \
62+
cd /usr/src/kcat && \
63+
curl -LfsS https://github.com/edenhill/kcat/archive/${KCAT_VERSION}.tar.gz | \
6364
tar xvzf - --strip-components=1 && \
6465
./configure --prefix=/usr && \
6566
make -j && \
6667
make install && \
6768
cd / && \
68-
rm -rf /usr/src/kafkacat && \
69-
kafkacat -V
69+
rm -rf /usr/src/kcat && \
70+
kcat -V
7071

7172
RUN \
7273
echo Installing confluent-kafka-python && \
7374
mkdir -p /usr/src/confluent-kafka-python && \
7475
cd /usr/src/confluent-kafka-python && \
7576
rm -rf build && \
7677
rm -rf dist && \
77-
python3 -m pip install build \
78+
python3 -m pip install build && \
7879
python3 -m build && \
7980
python3 -m pip install dist/confluent_kafka*whl && \
8081
cd / && \

tests/integration/integration_test.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,6 @@ def __del__(self):
266266
# since there is a on_delivery reference to it.
267267
not_called_state = None
268268
gc.collect()
269-
global DrOnlyTestSuccess_gced
270269
assert DrOnlyTestSuccess_gced == 0
271270

272271
print('only.error: Waiting for flush of %d messages' % len(p))

tests/test_KafkaError.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ def error_cb(err):
1818
def test_error_cb():
1919
""" Test the error callback. """
2020

21-
global seen_all_brokers_down
22-
2321
# Configure an invalid broker and make sure the ALL_BROKERS_DOWN
2422
# error is seen in the error callback.
2523
p = Producer({'bootstrap.servers': '127.0.0.1:1', 'socket.timeout.ms': 10,

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy