Install using Docker¶
Using Docker images, you can install the entire Confluent Platform or individual components.
The 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 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 Multi-Node Environment.
- 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. For 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 host network is the best approach
- If 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.