Install Confluent Platform Using Docker¶
Using Docker images, you can install the entire Confluent Platform or individual components.
The Confluent Platform Docker images are available on DockerHub, and the source files for the images are available on GitHub. From GitHub you can extend and rebuild the images and upload them to your own DockerHub repository. See Docker Image Reference for Confluent Platform for more information about the Confluent Platform images.
Looking for a fully managed cloud-native service for Apache Kafka®?
Sign up for Confluent Cloud and get started for free using the Cloud quick start.
Considerations¶
You should consider the following before using the Docker images.
- Multi-node Environment
- For more information, see Configure a Multi-Node Environment with Docker.
- Persistent Data (Mounted Volumes)
- When deploying Kafka and ZooKeeper images, you should always use Mounting Docker External Volumes for the file systems those images use for their persistent data. This ensures that the containers will retain their proper state when stopped and restarted. The other images maintain their state directly in Kafka topics, so mounted volumes are not usually required for those containers.
- Bridge Networking vs. Host Networking
Bridge networking is currently only supported on a single host. To run a bridge network over multiple hosts, you must use overlay networks which are not currently supported. To expose Kafka to clients outside of the bridge network, you must find the container IP and put it in
advertised.listeners
. This can be difficult to achieve depending on how you’re using the images. Furthermore, it can add a network hop and may not be as performant as the host network, which shares the network stack.Host networking is the recommended option in the following cases:
- Multi-host clusters without using Swarm/Kubernetes.
- You need clients to be able to access Kafka outside the bridge/overlay network.
- Adding Connectors to the Kafka Connect Image
Here are the methods to add new connectors to the Kafka Connect image.
- Build a new Docker image that has the connector installed. You can follow the examples found in
Extend Confluent Platform images. You must make sure that the connector
JARs are on the CLASSPATH for the Connect service (the default location of
/usr/share/java/kafka-connect-*
is the recommended location). - Add the connector JARs via volumes. If you don’t want to create a new Docker image, see the documentation
on Extend Confluent Platform images to configure the
cp-kafka-connect
container with external JARs.
- Build a new Docker image that has the connector installed. You can follow the examples found in
Extend Confluent Platform images. You must make sure that the connector
JARs are on the CLASSPATH for the Connect service (the default location of
- Supported Java
- The Confluent Docker images are tested and shipped with Azul Zulu OpenJDK. Other JDK’s (including Oracle Java) are supported, but you must extend the images yourself to implement that change.
- Untested Features
- The images are not currently tested on Docker Swarm.
- ZooKeeper
- As of Confluent Platform 7.5, ZooKeeper is deprecated for new deployments. Confluent recommends KRaft mode for new deployments. For more information, see KRaft Overview.
Supported platforms¶
Confluent Platform Docker images are provided for the following architectures:
Linux AMD64 & x86_64
Linux ARM64 & aarch64
Important
In preview support for evaluation and non-production testing purposes. These images are not for production workloads.
Linux ARM64 Docker images can be used on Apple macOS with M1.
To pull a Confluent Platform image for a specific architecture, use of the following command. The container runtime auto selects the platform:
docker pull confluentinc/<image-name>:<tag>
For example:
docker pull confluentinc/cp-server:latest
Optionally, you can use the --platform
option to pull your
platform-specific image, but most container runtimes automatically select this
for you.
For example:
docker pull confluentinc/cp-server:latest --platform linux/arm64