新建简单的docker-compose.yml文件 hello-world
version: '3.1'
services:
hello-world:
image: hello-world
使用命令可后台运行 docker-compose up -d
使用 docker-compose构建mongdb和mongodb-express
# docker-compose.yml
version: '3.1'
services:
mongo:
image: mongo
restart: always
ports:
- 27017:27017
mongo-express:
image: mongo-express
restart: always
ports:
- 8000:8081