Created
May 24, 2020 21:08
-
-
Save mabdiel/efd4cd57dc56ed0e79020ab79ba176c4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#lista os containers ativos | |
docker ps | |
#lista todos os containers ativos/inativos | |
docker ps -a | |
docker start -a CONTAINER_NAME | |
docker stop spotify/kafka | |
----------------- | |
NIFI | |
docker run --name nifi -p 8080:8080 -d apache/nifi:latest | |
http://localhost:8080/nifi | |
----------------- | |
KAFKA | |
docker run -p 2181:2181 -p 9092:9092 --env ADVERTISED_HOST=localhost --env ADVERTISED_PORT=9092 spotify/kafka | |
docker run -d -p 2181:2181 -p 9092:9092 --env ADVERTISED_HOST=kafka --env ADVERTISED_PORT=9092 --name kafka --hostname kafka spotify/kafka | |
docker run -it --rm spotify/kafka /bin/bash | |
$KAFKA_HOME/bin/kafka-console-producer.sh --broker-list 172.17.0.2:9092 --topic test | |
docker run -it --rm spotify/kafka /bin/bash | |
$KAFKA_HOME/bin/kafka-console-consumer.sh --zookeeper 172.17.0.2:2181 --topic test | |
------- | |
docker run -d -p 2181:2181 -p 9092:9092 --env ADVERTISED_HOST=kafka_2 --env ADVERTISED_PORT=9092 --name kafka_2 --hostname kafka_2 spotify/kafka | |
docker exec kafka_2 /opt/kafka_2.11-0.10.1.0/bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic test | |
docker exec kafka_2 /opt/kafka_2.11-0.10.1.0/bin/kafka-topics.sh --list --zookeeper localhost:2181 | |
docker run -it --rm --link kafka_2 spotify/kafka /opt/kafka_2.11-0.10.1.0/bin/kafka-console-producer.sh --broker-list kafka_2:9092 --topic test | |
docker run -it --rm --link kafka_2 spotify/kafka /opt/kafka_2.11-0.10.1.0/bin/kafka-console-consumer.sh --bootstrap-server kafka_2:9092 --topic test --from-beginning |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment