Creating Volume Mount from docker run command & sharing same Volume Mounts among multiple containers

Tested Infrastructure

Platform Number of Instance Reading Time
Play with Docker 1 5 min


Volumes can be shared across containers


$ docker rm -f $(docker ps -a -q)
$ docker volume rm $(docker volume ls -q)


  1. The Task for this lab is to create a volume, call it my_volume.

  2. you should than run a simple an thin container and attach a volume to it. use the image selaworkshops/busybox:latest and use any name to the mounted volume directory (e.g : data)

  3. change something in the volume folder , e.g : add a file with some content.

  4. create a second volume mounted to the same volume , make sure the file you created in step 3 exists !


Next » The docker network Command