3 ms·
does anyone know if this impacts docker images as well ?
by sandGorgon 10y ago
does anyone know if this impacts docker images as well ?
- yeukhon 10y agoI would be surprised if this doesn't. There's nothing specific about docker when running this C code from any other processes running on a Linux host.
- noselasd 10y agoIf you havn't set the TZ variable in the image, then yes.
- pquerna 10y agoYes, at least the Docker images that use glibc as their libc. (eg, most Debian/Ubuntu images) It looks like musl, which is used on Alpine Linux images for example, will only read it once, and then cache it: https://github.com/esmil/musl/blob/master/src/time/__tz.c#L121 https://github.com/esmil/musl/blob/master/src/time/__tz.c#L1... It has a mutex/lock around the use of the TZ info, but avoids re-stat'ing the localtime file.
- nathancahill 10y agoThis is the best part of HN. Not only did you answer GP's question in 6 minutes, but you link to the exact line of the source code.