In my Dockerfile these were the contents,
FROM php:7.0-apache
COPY src/ /var/www/html/public
VOLUME src/ /var/www/html/public
EXPOSE 80
You see, I have mounted /src
to /var/www/html/public
now I went to the container to find out the what all mounts have been made inside the container more specifically finding out /src /var/ww/html/public
.
I searched it and found the command /proc/mounts
can help me out. So I tried, results are
...
/dev/vda1 /src ext4 rw,relatime 0 0
/dev/vda1 /etc/resolv.conf ext4 rw,relatime 0 0
/dev/vda1 /etc/hostname ext4 rw,relatime 0 0
/dev/vda1 /etc/hosts ext4 rw,relatime 0 0
/dev/vda1 /var/www/html/public ext4 rw,relatime 0 0
...
This part of the results does contains things that I want to know. As very first line contains /src
and the 5th line contains /var/www/html/public
But how do I interpret the results. In other words, by looking the file contents how do I know that host /src
mounted to container directory /var/www/html/public
?
What I thought I would get the results like this.
/src /var/www/html/public
but instead /dev/vda1
was interfering, So How do I understand this.