我有一个带有 docker 映像的项目,其卷包含启动时的内容。是否有任何方法可以在卷上合并主机和容器的内容,同时保持主机内容在容器中持久存在?
这是我的 compose.yml
services:
db:
image: mysql
environment:
MYSQL_DATABASE: ninja
MYSQL_ROOT_PASSWORD: pwd
app:
image: invoiceninja/invoiceninja
volumes:
- ./install-wipay.sh:/install-wipay.sh
- ./composer.json:/var/www/app/composer.json
# would like to merge and persist this volume
- ~/Documents/Git/heroku/invoiceninja/app/:/var/www/app
- ~/Documents/Git/omnipay-wipay/:/var/repo/omnipay-wipay/:ro
- ./.env:/var/www/app/.env:ro
- ./storage:/var/www/app/docker-backup-storage:rw
- ./logo:/var/www/app/docker-backup-public/logo/
links:
- db:mysql
env_file: .env
web:
image: nginx
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro