Docker Community Forums

Share and learn in the Docker community.

Why does my mounted volume only have one folder instead of the expected 50?


(Mcred) #1

I am hoping someone can suggest some places to look to help me figure out why a volume that I have mounted isn’t accessible inside of my container. There is a volume outside of the /Users/ folder (Mac OSX) that I can confirm is a valid shared folder inside of VirualBox.

When I run my container as a web server I use the following command:

docker run -d -p 80:80 -v /htdocs:/var/www/html mycontainer /usr/sbin/apache2ctl -D FOREGROUND

It launches and runs as a web server, as expected. However when I go to my browser, it only shows 1 folder that is inside of the htdocs folder. If I change the launch command to:

docker run -d -p 80:80 -v /Users:/var/www/html mycontainer /usr/sbin/apache2ctl -D FOREGROUND

It shows me the entire contents of the Users folder locally. I can not figure out what the difference is between these two volumes and how they are mounted. Any suggestions? Where can I look to see a difference? Why would my mounted volume only show one older out of about 50?