这个问题已经在这里有了答案: > Docker: where is docker volume located for this compose file 1个
我有这个docker-compose.yml文件
version: '3' volumes: jenkins_home: services: registry: image: registry:2 ports: - "5000:5000" jenkins: image: jenkins/jenkins ports: - "9090:8080" volumes: - jenkins_home:/var/jenkins_home
@H_403_9@如您所见,有一个名为jenkins_home的命名卷,现在我想知道,数据真正保留在哪里?
运行docker inspect infra_jenkins我得到了这个:
... "Mounts": [ { "Type": "volume","Source": "infra_jenkins_home","Target": "/var/jenkins_home","VolumeOptions": { "Labels": { "com.docker.stack.namespace": "infra" } } } ],...
@H_403_9@我正在使用docker stack deploy命令在本地docker swarm群集上运行这些服务,该群集由三个VirtualBox实例组成.
最佳答案