docker部署redis,kafka

docker部署redis

参考文档

docker离线部署kafka

先离线安装docker-compose

下载地址:
https://github.com/docker/compose/releases
mv docker-compose-Linux-x86_64 /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
docker-compose.yml
version: '3.2' services: zookeeper: image: wurstmeister/zookeeper ports: - "2181:2181" restart: always kafka: image: wurstmeister/kafka:latest ports: - "9092:9092" environment: - KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181 - KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://172.30.201.63:9092 - KAFKA_LISTENERS=PLAINTEXT://:9092 volumes: - /var/run/docker.sock:/var/run/docker.sock restart: always

启动方式

docker-compose up -d

posted @ 2021-05-13 14:18  hanjianfei  阅读(119)  评论(0编辑  收藏  举报