Open vivienne-w opened 1 month ago
From what I can tell, the issue seems to stem from ConfigureContainerTimeZone
:
Since TZDIR
is set on my system, it completely ignores that timezone
is "local"
, and thus tries to look up etc/zoneinfo/local
.
Since the fix looks simple enough, Id happily open a PR, if its alright to use the CI for running the tests.
PR are welcome, note that the code you linked is in c/common so the fix must be submitted there first then we can update the dependency in podman once this is merged there.
I guess swapping both cases will make it work.
@vivienne-w I see commit here linked, are you going to open a PR in c/common?
Issue Description
When creating a container on NixOS with
--tz local
, it later fails to start with this error:Error: unable to start container "73dff85a07f82a43733f8685b561e4b175c282de8d6355ee433ab65c025088a8": configuring timezone for container 73dff85a07f82a43733f8685b561e4b175c282de8d6355ee433ab65c025088a8: setting timezone for container 73dff85a07f82a43733f8685b561e4b175c282de8d6355ee433ab65c025088a8: stat /etc/zoneinfo/local: no such file or directory
Steps to reproduce the issue
podman create --tz local --name test debian
podman start test
Describe the results you received
Error: unable to start container "73dff85a07f82a43733f8685b561e4b175c282de8d6355ee433ab65c025088a8": configuring timezone for container 73dff85a07f82a43733f8685b561e4b175c282de8d6355ee433ab65c025088a8: setting timezone for container 73dff85a07f82a43733f8685b561e4b175c282de8d6355ee433ab65c025088a8: stat /etc/zoneinfo/local: no such file or directory
Describe the results you expected
The container starts normally, with the correct timezone configured.
podman info output
Podman in a container
No
Privileged Or Rootless
Rootless
Upstream Latest Release
Yes
Additional environment details
OS: NixOS
Additional information
I assume this issue is related to NixOS setting
TZDIR
.