查看数据卷目录
  • 查看数据卷目录
    1
    ❯ docker ps
    2
    CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
    3
    4921388fd12e prom/prometheus "/bin/prometheus --c…" 25 minutes ago Up 24 minutes 9090/tcp root_prometheus_1
    4
    7af8aa4ae2e8 traefik:latest "/entrypoint.sh --ap…" 21 hours ago Up 21 hours 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp, 0.0.0.0:8080->8080/tcp root_traefik_1
    5
    1ecf1c53559d grafana/grafana "/run.sh" 23 hours ago Up 22 hours 3000/tcp root_grafana_1
    6
    ❯ docker inspect --format "{{.Config.Volumes}}" 4921388fd12e
    7
    map[/etc/prometheus/prometheus.yml:{} /prometheus:{}]
    8
    ❯ docker inspect -f "{{.Mounts}}" 4921388fd12e
    9
    [{bind /root/prometheus.yml /etc/prometheus/prometheus.yml rw true rprivate} {volume f9f579cb9ca6ac88d3bf8e10d0ca263646e00b77414c37952c4ea61dc16b277e /var/lib/docker/volumes/f9f579cb9ca6ac88d3bf8e10d0ca263646e00b77414c37952c4ea61dc16b277e/_data /prometheus local rw true }]
    Copied!
    1
    CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
    2
    4921388fd12e prom/prometheus "/bin/prometheus --c…" 31 minutes ago Up 31 minutes 9090/tcp root_prometheus_1
    3
    ❯ docker inspect 4921388fd12e|grep Mounts -A 20
    4
    "Mounts": [
    5
    {
    6
    "Type": "bind",
    7
    "Source": "/root/prometheus.yml",
    8
    "Destination": "/etc/prometheus/prometheus.yml",
    9
    "Mode": "rw",
    10
    "RW": true,
    11
    "Propagation": "rprivate"
    12
    },
    13
    {
    14
    "Type": "volume",
    15
    "Name": "f9f579cb9ca6ac88d3bf8e10d0ca263646e00b77414c37952c4ea61dc16b277e",
    16
    "Source": "/var/lib/docker/volumes/f9f579cb9ca6ac88d3bf8e10d0ca263646e00b77414c37952c4ea61dc16b277e/_data",
    17
    "Destination": "/prometheus",
    18
    "Driver": "local",
    19
    "Mode": "rw",
    20
    "RW": true,
    21
    "Propagation": ""
    22
    }
    23
    ],
    24
    "Config": {
    Copied!
最近更新 10mo ago
复制链接