docker inspect 커맨드

docker 2018.09.14 19:14



docker run을 실행한 후,  어떤 매개 변수를 썼는지 기억이 안날 때라든가,

현재 docker가 어떻게 실행되고 있는지 보려면 docker inspect 커맨드를 사용하면 된다.


여러 docker volume을 지원하는지도 알 수 있다..



$ sudo docker inspect google-jenkins



$ sudo docker inspect --format "{{ json .Mounts }}" google-jenkins



[{"Type":"volume","Name":"feda69298044ad46ab3444bd40ab81089e84cd5646259fa948b3325b8dfcd35f","Source":"/var/lib/docker/volumes/feda69298044ad46ab3444bd40ab81089e84cd5646259fa948b3325b8dfcd35f/_data","Destination":"/var/jenkins_home","Driver":"local","Mode":"","RW":true,"Propagation":""},{"Type":"volume","Name":"jenkins_home","Source":"/var/lib/docker/volumes/jenkins_home/_data","Destination":"/var/lib/jenkins","Driver":"local","Mode":"z","RW":true,"Propagation":""},{"Type":"bind","Source":"/root/.ssh","Destination":"/root/.ssh","Mode":"","RW":true,"Propagation":"rprivate"}]



https://docs.docker.com/engine/reference/commandline/inspect/#get-an-instances-image-name

Posted by 김용환 '김용환'