加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

docker命名卷存储在哪里?

发布时间:2020-12-16 03:26:02 所属栏目:安全 来源:网络整理
导读:这个问题已经在这里有了答案:????????????????????????Docker: where is docker volume located for this compose file????????????????????????????????????1个 我有这个docker-compose.yml文件 version: '3'volumes: jenkins_home:services: registry: im

这个问题已经在这里有了答案:????????????>????????????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

如您所见,有一个名为jenkins_home的命名卷,现在我想知道,数据真正保留在哪里?

运行docker inspect infra_jenkins我得到了这个:

 ...
 "Mounts": [
    {
      "Type": "volume","Source": "infra_jenkins_home","Target": "/var/jenkins_home","VolumeOptions": {
      "Labels": {
      "com.docker.stack.namespace": "infra"
              }
          }
      }
],...

我正在使用docker stack deploy命令在本地docker swarm群集上运行这些服务,该群集由三个VirtualBox实例组成.

最佳答案
您可以检查Docker卷并查看详细信息.

查看docker volume reference

编辑(评论建议):

或者(有关确切答案)请参见already answered question.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读