Hello everyone
I'm trying to understand how the Ownership of Volumes works on Windows for Docker Container.
I'm using the following Dockerfile as a test
FROM centos:7
MAINTAINER Lovely Sausage
RUN echo "root:root" | chpasswd
# DUMMY MYSQL
RUN \
adduser mysql && \
mkdir -p /mysql
# DUMMY POSTGRESQL
RUN \
adduser postgres && \
mkdir -p /postgresql
When I run it using the following command
docker run -d -v //c/mysql:/mysql -v //c/postgresql:/postgresql --name centos7_vol1 centos7_vol
I can see that the folders have ownership as follows
drwxrwxrwx 1 mysql ftp 0 Nov 21 11:43 mysql
drwxrwxrwx 1 mysql ftp 0 Nov 21 11:43 postgresql
I don't understand why especially because if I change the Dockerfile so that the DUMMY POSTGRESQL part comes before the DUMMY MYSQL part then the ownership is as follows
drwxrwxrwx 1 postgres ftp 0 Nov 21 11:43 mysql
drwxrwxrwx 1 postgres ftp 0 Nov 21 11:43 postgresql
Where are these permissions being set?