efrecon / docker-s3fs-client

Alpine-based s3fs client: mount from container, make available to other containers
BSD 3-Clause "New" or "Revised" License
181 stars 64 forks source link

Don't use `ls` on container start. #51

Closed djpetti closed 1 year ago

djpetti commented 1 year ago

If you have a bucket that contains many files, ls can be extremely slow, because it has to read everything in the directory and then sort it. This is all largely pointless, since we just want to run an operation to force it to mount the directory. In this case, I've replaced the ls with a touch command that creates and then deletes an empty file, which hopefully would have the same effect.