Skip to content

Instantly share code, notes, and snippets.

@wheresalice
Last active October 7, 2019 12:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wheresalice/e02935a0bc291de3cd2c8ccaf5b7579e to your computer and use it in GitHub Desktop.
Save wheresalice/e02935a0bc291de3cd2c8ccaf5b7579e to your computer and use it in GitHub Desktop.
docker-compose file for running Confluent Platform locally
version: '2'
services:
zookeeper:
image: "confluentinc/cp-zookeeper:5.3.0"
hostname: zookeeper
ports:
- '32181:32181'
environment:
ZOOKEEPER_CLIENT_PORT: 32181
ZOOKEEPER_TICK_TIME: 2000
extra_hosts:
- "moby:127.0.0.1"
kafka:
image: "confluentinc/cp-enterprise-kafka:5.3.0"
hostname: kafka
ports:
- '9092:9092'
- '29092:29092'
depends_on:
- zookeeper
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: zookeeper:32181
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:29092,PLAINTEXT_HOST://localhost:9092
KAFKA_METRIC_REPORTERS: io.confluent.metrics.reporter.ConfluentMetricsReporter
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
CONFLUENT_METRICS_REPORTER_BOOTSTRAP_SERVERS: kafka:29092
CONFLUENT_METRICS_REPORTER_ZOOKEEPER_CONNECT: zookeeper:32181
CONFLUENT_METRICS_REPORTER_TOPIC_REPLICAS: 1
CONFLUENT_METRICS_ENABLE: 'true'
CONFLUENT_SUPPORT_CUSTOMER_ID: 'anonymous'
extra_hosts:
- "moby:127.0.0.1"
schema-registry:
image: "confluentinc/cp-schema-registry:latest"
hostname: schema-registry
depends_on:
- zookeeper
- kafka
ports:
- '8081:8081'
environment:
SCHEMA_REGISTRY_HOST_NAME: schema-registry
SCHEMA_REGISTRY_KAFKASTORE_CONNECTION_URL: zookeeper:32181
extra_hosts:
- "moby:127.0.0.1"
rest-proxy:
image: "confluentinc/cp-kafka-rest:5.3.0"
hostname: rest-proxy
ports:
- '18082:8082'
depends_on:
- kafka
- schema-registry
environment:
KAFKA_REST_HOST_NAME: rest-proxy
KAFKA_REST_BOOTSTRAP_SERVERS: 'kafka:29092'
KAFKA_REST_LISTENERS: "http://0.0.0.0:8082"
KAFKA_REST_SCHEMA_REGISTRY_URL: 'http://schema-registry:8081'
kafka-topics-ui:
image: "landoop/kafka-topics-ui"
hostname: kafka-topics-ui
ports:
- '8000:8000'
depends_on:
- rest-proxy
environment:
KAFKA_REST_PROXY_URL: 'http://rest-proxy:8082'
PROXY: 'true'
ksql-server:
image: "confluentinc/cp-ksql-server:5.3.0"
depends_on:
- kafka
- schema-registry
ports:
- '8088:8088'
environment:
KSQL_BOOTSTRAP_SERVERS: kafka:29092
KSQL_LISTENERS: http://0.0.0.0:8088
KSQL_KSQL_SCHEMA_REGISTRY_URL: http://schema-registry:8081
docker run --network $(basename `pwd`)_default --rm --interactive --tty confluentinc/cp-ksql-cli http://ksql-server:8088
open http://localhost:8000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment