Noatime in docker

Is it possible to define Noatime inside the docker container?

Why do you need that?

Reduce write operations. With atime enabled every garbage collection execution will update the atime of every file. That will consume some unessesary write operations.

3 Likes

Then perhaps you need to use a btrfs docker driver. Never tried.

Is there a need to handle this at the Docker level? You should be able to handle this at the filesystem level, typically as a mount option.

5 Likes

This seems to be handled on the parent FS.

Trying to access both nsfs and overlay with ls or cat then checking if atime changed with ls -lu yields the same file edit timestamp on my system.

Overlay is specifically mounted with relatime too from what I see.

Interestingly, OpenWRT mounts their overlay with noatime, but that’s a different setup than Docker.