目的
对于使用docker compose启动的容器,
我们可以使用命令诊断其启动的目录。
方法
song@song-VirtualBox:~$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
6d4e4431d09d goharbor/registry-photon:v2.3.2 "/home/harbor/entryp…" 2 weeks ago Up 30 minutes (healthy) registry
fc9d2eb37b60 goharbor/harbor-portal:v2.3.2 "nginx -g 'daemon of…" 2 weeks ago Up 30 minutes (healthy) harbor-portal
759c31814d07 goharbor/harbor-log:v2.3.2 "/bin/sh -c /usr/loc…" 2 weeks ago Up 30 minutes (healthy) 127.0.0.1:1514->10514/tcp harbor-log
57241d2cfb5d kindest/node:v1.27.1 "/usr/local/bin/entr…" 2 weeks ago Up 30 minutes 127.0.0.1:46539->6443/tcp kind-control-plane
song@song-VirtualBox:~$
song@song-VirtualBox:~$
song@song-VirtualBox:~$ docker inspect 6d4e4431d09d | grep compose
"com.docker.compose.config-hash": "433a8af0c7a2ad1bad3920b0052b2ef2a97453c2bb121a5a6fecbea590fbee5c",
"com.docker.compose.container-number": "1",
"com.docker.compose.oneoff": "False",
"com.docker.compose.project": "harbor",
"com.docker.compose.project.config_files": "docker-compose.yml",
"com.docker.compose.project.working_dir": "/home/song/softwares/harbor/harbor",
"com.docker.compose.service": "registry",
"com.docker.compose.version": "1.29.2",
song@song-VirtualBox:~$
song@song-VirtualBox:~$
标签:compose,song,harbor,docker,com,目录,VirtualBox From: https://www.cnblogs.com/lightsong/p/17485391.html