container-best-practices
container-best-practices copied to clipboard
Is mounting /etc/localtime to a container OK without also mounting /etc/timezone?
I found your tip of mounting the hosts /etc/localtime to the container, but it looks like Debian distros don't depend on /etc/localtime being a symlink to the tzdata file, they use the /etc/timezone file to identify the timezone. So is it OK to mount /etc/localtime from the host to container without also mounting /etc/timezone? Even if the OS did still depend on /etc/localtime being a symlink, it doesn't seem that this symlink association would be visible to the container.
@sprior I think this would be distro specific. The symlink would be flattened out and would be a reference point but wouldn't be honored for changes. I would do as you said and simply bind mount /etc/timezone for debian based distros.