In a Go program I call time.LoadLocation("Europe/Berlin")
and it returns an error saying open /usr/local/go/lib/time/zoneinfo.zip: no such file or directory
, even though in the container (running alpine:3.9
with tzdata installed) /usr/share/zoneinfo/Europe/Berlin
exists and, according to the docs, should take precedence over the zip file. The same program finds the file on my machine (Arch Linux). The executable got statically linked on my machine and then copied into the container. I tried Go 1.11.5 and 1.10.3.
I built the executable with:
CGO_ENABLED=0 go build -a -ldflags "-s" -o gocake_static
I'm looking for any ideas that help me identify the problem.