docker run -it --name zookeeper -p 12181:2181 -d wurstmeister/zookeeper:latest 根据这条命令帮我写个docker-compose
时间: 2024-04-11 17:28:47 浏览: 239
docker-compose
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.
阅读全文