Docker Community Forums

Share and learn in the Docker community.

New Docker learner

docker

#1

Hi,
I am new to Docker
Can you know any body how to check each volume mounted how many docker containers
is it possible to attach storage volume to docker container


(Gary Forghetti) #2

Take a look here: https://docs.docker.com/storage/volumes/

Display the volumes.

šŸ³  gforghetti:[~/Vagrants/Docker-Wildbook/Generic] $ docker volume ls
DRIVER              VOLUME NAME
local               app_wildbook-mysql-data

Display the container(s) using the volume named app_wildbook-mysql-data.

šŸ³  gforghetti:[~/Vagrants/Docker-Wildbook/Generic] $ docker ps -a --filter volume=app_wildbook-mysql-data
CONTAINER ID        IMAGE                         COMMAND                  CREATED             STATUS              PORTS                 NAMES
57262b2cb05d        gforghetti/mysql-server:5.7   "docker-entrypoint.sā€¦"   2 minutes ago       Up 2 minutes        3306/tcp, 33060/tcp   app_mysql-wildbook.1.nr79elhjyz2wmvk3mrwndhxsd