docker-alpine
docker-alpine copied to clipboard
Timezone resets to UTC when removing tzdata as per wiki
I'm using node:10.1-alpine
.
Following the steps from this Wiki page to setup the OS timezone: https://wiki.alpinelinux.org/wiki/Setting_the_timezone
I'm noticing that the system timezone gets reset to UTC if I cleanup and delete the tzdata package once I'm done setting up and confirming the correct timezone.
Not sure if the last step in that wiki needs to be removed or if I did something incorrectly to maintain the timezone preference?
Will result in image with UTC:
RUN apk add --update tzdata && cp /usr/share/zoneinfo/America/New_York /etc/localtime && echo "America/New_York" > /etc/timezone && apk del tzdata && rm -rf /var/cache/apk/* && rm -rf /usr/local/share/.cache
Will result in image with EDT:
RUN apk add --update tzdata && cp /usr/share/zoneinfo/America/New_York /etc/localtime && echo "America/New_York" > /etc/timezone && rm -rf /var/cache/apk/* && rm -rf /usr/local/share/.cache
The you are probably using:
library-3.6 library-3.7 library-3.8
aarch64 Bump version 3.8.1 23 days ago
armhf Bump version 3.8.1 23 days ago
ppc64le Bump version 3.8.1 23 days ago
s390x Bump version 3.8.1 23 days ago
x86 Bump version 3.8.1 23 days ago
23 Days ago there was a change setting the default timezone to UTC check: https://github.com/gliderlabs/docker-alpine/blob/master/versions/library-3.8/aarch64/Dockerfile https://github.com/gliderlabs/docker-alpine/blob/master/versions/library-3.8/armhf/Dockerfile https://github.com/gliderlabs/docker-alpine/blob/master/versions/library-3.8/ppc64le/Dockerfile https://github.com/gliderlabs/docker-alpine/blob/master/versions/library-3.8/s390x/Dockerfile https://github.com/gliderlabs/docker-alpine/blob/master/versions/library-3.8/x86/Dockerfile
I have the same problem and I confirm that when I don't remove tzdata
at the end, time is correct (image alpine:20220328)