Docker装一切

时间:Oct. 27, 2021 分类:

目录:

zookeeper

docker run -d --name zookeeper -p 2181:2181 -t wurstmeister/zookeeper

kafka

docker run -d --name kafka --network host --env KAFKA_ZOOKEEPER_CONNECT=10.210.40.103:2181 --env KAFKA_ADVERTISED_HOST_NAME=10.210.40.103 --env KAFKA_ADVERTISED_PORT=9092  wurstmeister/kafka:latest

mysql

docker run -itd --name mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=123456 mysql:5.7

redis

docker run -itd --name redis -p 6379:6379 redis:3.2

consul

docker run -id --name=consul -p 8300:8300 -p 8301:8301 -p 8302:8302 -p 8500:8500 -p 8600:8600 consul agent -server -ui -node=n1 -bootstrap-expect=1 -client=0.0.0.0