vintrojan
vintrojan

Reputation: 1547

What is the file-system of a Docker container? On which file system does an application running inside this container runs on?

Basically, I am running Docker on my Windows 10 machine. I have mounted a windows directory inside this container to access the files on my windows machine, on which a couple of tasks are to be performed.

Which file system runs inside a docker container?

  1. Is it the same as that of the OS on which this container is based? For instance, if I run a container having ubuntu as base OS, will it be the one that the current version of ubuntu (inside this container is running)?
  2. Or is it the one that is running on the docker daemon?

Also, I am running an application inside this container, which accesses files in my windows directory as well as creates a couple of files. Now, these files are being written to Windows, hence follow the file system of Windows(NTFS). So, how does it work? (Different file system inside the docker container and the windows file system; both in conjunctuion?)

Upvotes: 1

Views: 2853

Answers (1)

VonC
VonC

Reputation: 1327902

Which file system runs inside a docker container?

The one from the docker host (Windows NTFS or Ubuntu FS).

$ docker run -d -P --name web -v /src/webapp:/opt/webapp training/webapp python app.py

This command mounts the host directory, /src/webapp, into the container at /opt/webapp.
If the path /opt/webapp already exists inside the container’s image, the /src/webapp mount overlays but does not remove the pre-existing content.
Once the mount is removed, the content is accessible again.

Now, these files are being written to Windows, hence follow the file system of Windows(NTFS).

Yes, and that filesystem is case-sensitive (as illustrated in 18756).

Upvotes: 1

Related Questions