How to Install Confluent Kafka with Docker Image

Hi

I need to install confluent-kafka in a Docker image on my NVIDIA Jetson Orin Nano to use a Python script to send data to a Kafka broker. Currently, I have installed OpenSSL 3.3.1 using these commands.

#!/bin/bash

# Update and install necessary packages
apt-get update && \
apt-get install -y wget unzip git build-essential software-properties-common lsb-release gcc make python3-pip python3-dev libsasl2-modules-gssapi-mit krb5-user zlib1g-dev libssl-dev libsasl2-dev libzstd>
rm -rf /var/lib/apt/lists/*

pip3 install --upgrade pip

OPENSSL_VERSION="openssl-3.3.1"

# Create directories
mkdir -p /tmp/openssl

# Download and extract OpenSSL
cd /tmp/openssl
wget https://www.openssl.org/source/$OPENSSL_VERSION.tar.gz
tar -xvf $OPENSSL_VERSION.tar.gz

# Build and install OpenSSL
cd /tmp/openssl/$OPENSSL_VERSION
./config --prefix=/usr/local/openssl --openssldir=/usr/local/openssl
make
make install

# Update library configuration
echo "/usr/local/openssl/lib" > /etc/ld.so.conf.d/openssl-$OPENSSL_VERSION.conf
ldconfig

# Set LD_LIBRARY_PATH to include the new OpenSSL libraries
export LD_LIBRARY_PATH=/usr/local/openssl/lib:$LD_LIBRARY_PATH
export PATH=/usr/local/openssl/bin:$PATH

# Create symbolic links for OpenSSL
ln -sf /usr/local/openssl/bin/openssl /usr/bin/openssl
ln -sf /usr/local/openssl/include/openssl /usr/include/openssl

# Verify OpenSSL installation
/usr/local/openssl/bin/openssl version

I am not sure the correct method to install both of them when build docker image, Could you please share the correct commands for installing librdkafka and confluent-kafka version 2.4.0 when building a Docker image?"

Hi,

Do you mean errors when building the image or testing the Kafka functionality?
If not, it should be fine.

Thanks.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.