I'm trying to get a kafka instance going inside a docker container. The docker-compose.yml looks like this:
version: '2'
services:
zookeeper:
image: 'bitnami/zookeeper:3'
ports:
- '2181:2181'
volumes:
- 'zookeeper_data:/bitnami'
environment:
- ALLOW_ANONYMOUS_LOGIN=yes
kafka:
image: 'bitnami/kafka:2'
ports:
- '9092:9092'
volumes:
- 'kafka_data:/bitnami'
environment:
- KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper:2181
- ALLOW_PLAINTEXT_LISTENER=yes
- KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://localhost:9092
- KAFKA_CREATE_TOPICS=A_TOPIC,ANOTHER_TOPIC
depends_on:
- zookeeper
volumes:
zookeeper_data:
driver: local
kafka_data:
driver: local
The container gives no evident errors when I run docker-compose up
. However, when I connect to the container's shell
docker exec -it [container] /bin/bash
I see
I have no name!@7fe183af5e2a:/$
where 7fe183af5e2a is the container.
Any reason for I have no name!
? Am I missing something simple?