diff options
| author | daltux <1medinnz@duck.com> | 2025-09-04 15:25:24 -0300 |
|---|---|---|
| committer | daltux <1medinnz@duck.com> | 2025-09-04 15:25:24 -0300 |
| commit | 0f1b67611317ab7163a134573b525eb10b415ea8 (patch) | |
| tree | b0c09d2a31302f2c5d71642add1117034badfa15 /examples | |
| parent | 36d7bea25d5fcdf6f8417c0403b063726c954ed9 (diff) | |
Add tzdata to container image
Install Alpine package `tzdata` to the container image.
When running it, set timezone from environment variable TZ if not empty.
Diffstat (limited to 'examples')
| -rwxr-xr-x | examples/docker-entrypoint.sh | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/examples/docker-entrypoint.sh b/examples/docker-entrypoint.sh index a6216b2..d198bf2 100755 --- a/examples/docker-entrypoint.sh +++ b/examples/docker-entrypoint.sh @@ -1,7 +1,11 @@ #! /bin/sh -if [ ! -e /data/data/server.json ] -then +if [ -n "$TZ" ] ; then + ln -snf "/usr/share/zoneinfo/$TZ" /etc/localtime \ + && echo "$TZ" > /etc/timezone +fi +if [ ! -e /data/data/server.json ] ; then echo -ne "0.0.0.0\r\n8001\r\nlocalhost\r\n\r\n\r\n" | snac init /data/data snac adduser /data/data testuser fi SSLKEYLOGFILE=/data/key snac httpd /data/data + |