我试着理解为什么我们在码头文件中有volumes内部服务,而volumes外部服务在同一个文件中?我们就不能用一个吗?
下面是使用postgres数据库构建的durpal内容管理系统:
version: '2'
services:
durpal:
image: durpal
ports:
- '8080:80'
volumes:
- drupal-modules:/var/www/html/modules
- drupal-profiles:/var/www/html/profiles
- drupal-sites:/var/www/html/sites
- drupal-themes:/var/www/html/themes
postgres:
image: postgres
environment:
- POSTGRES_PASSWORD = mypasswd
volumes:
- drupal-modules:
- drupal-profiles:
- drupal-sites:
- drupal-themes:https://stackoverflow.com/questions/73611250
复制相似问题