docker run -it --name zookeeper -p 12181:2181 -d wurstmeister/zookeeper:latest 根据这条命令帮我写个docker-compose
时间: 2024-04-11 10:28:47 浏览: 235
docker-compose
3星 · 编辑精心推荐
Sure! Here's the equivalent `docker-compose.yml` file for the given Docker command:
```yaml
version: '3'
services:
zookeeper:
image: wurstmeister/zookeeper:latest
ports:
- 12181:2181
container_name: zookeeper
tty: true
restart: always
```
You can save this content into a file named `docker-compose.yml` and run `docker-compose up -d` to start the ZooKeeper container.
阅读全文