Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is docker listing files in empty directory?

Tags:

docker

Docker is listing files in directory but they are not visible in explorer or command line. I have created these files using docker. What sorcery is this?

I am using windows 10 enterprise edition and docker community version 19.03.1.

PS C:\Users\mrigank.varma\.aws> docker run --rm -v ~\.aws:/data alpine ls /data

config
credentials

PS C:\Users\mrigank.varma\.aws> ls

PS C:\Users\mrigank.varma\.aws>
like image 900
Mrigank Kishore Varma Avatar asked Aug 27 '19 14:08

Mrigank Kishore Varma


People also ask

Where docker files are stored?

Docker also supports containers storing files in-memory on the host machine. Such files are not persisted. If you're running Docker on Linux, tmpfs mount is used to store files in the host's system memory. If you're running Docker on Windows, named pipe is used to store files in the host's system memory.

Which is the default data directory for docker?

The standard data directory used by docker is /var/lib/docker, and since this directory will store all your images, volumes, etc. it can become quite large in a relative small amount of time. If you want to move the docker data directory on another location you can follow the following simple steps.


1 Answers

Your files are probably 'hidden' in Windows, but since they are not 'dot' files in Linux, they are shown when you list the directory via the container.

Check your folder again in Windows Explorer with hidden files showing. Bear in mind they may be system files, so make sure you do this 'as Administrator.' Other methods are available - see https://pureinfotech.com/show-hidden-files-folders-windows-10/

Another option in Windows may be Get-ChildItem -hidden in Powershell (see comments 1 & 2 from Dorian below.)

like image 71
Abulafia Avatar answered Nov 15 '22 07:11

Abulafia