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.
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 the 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, please see our documentation
on Extend Confluent Platform images to configure the
cp-kafka-connectcontainer 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.
Confluent Platform Docker images are provided for the following architectures:
Linux AMD64 & x86_64
Linux ARM64 & aarch64
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>
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
docker pull confluentinc/cp-server:latest --platform linux/arm64