This Gradle plugin automatically spins up Docker containers for Zookeeper and Kafka. It is perfect for local development, testing, and debugging purposes.
- Automatic startup of Zookeeper and Kafka containers.
- Awaits full initialization of Zookeeper before launching Kafka.
- Dynamically detects the Docker Engine URI based on the operating system.
- Add the plugin code to your Gradle project.
- Apply the plugin in your
build.gradle
file:
apply plugin: 'o.sur.gradledevcontainers'
To start the containers, execute the following command:
./gradlew RUN_KAFKA
- Docker must be installed and running on your machine.
By default, the plugin will use tcp
to connect to the Docker Engine on Windows and unix
for other operating systems.