Docker Community Forums

Share and learn in the Docker community.

Dirent.h not working with Docker volume

docker

(Southclaws) #1

Hi, I’m working with a rather old C++ program and one of the plugins uses the dirent.h library to provide directory listing features to the program.

Strangely, it reads empty for Docker volumes mounted with -v and it’s kind of got me stuck in a project. Is there anything I can do to resolve this? The only other solution I can think of is to mount the volume into a temporary directory then write a script to copy stuff over to a “normal” directory but this just feels really hacky and stupid.

Edit: solution here: https://stackoverflow.com/questions/46484059/c-dirent-h-not-working-with-in-docker-container-when-the-target-directory-is-a/46493085#46493085

Edit 2: solution does not work on windows - the whole reason I’m trying to do this.


(Southclaws) #2

Bump: still not working, no errors or helpful logs, mount just appears empty.