Closed pointbre closed 5 years ago
@pointbre thanks. You mean you only had to set the TZ
env var?
That is a straightforward change. I'll add it to the container.
RUN apk add tzdata
to Dockerfile and TZ
env var to container, that's all. Tested with NZ timezone on Ubuntu 18.04. Thanks.
Another option is to add this to your docker-compose.yml when using the container
volumes:
- "/etc/localtime:/etc/localtime:ro"
Snippet I'm using in almost all my alpine containers:
# Timezone
ENV TIMEZONE Europe/Berlin
# Install timezone data and setup timezone
RUN apk --update add --no-cache --virtual .tz-deps tzdata \
&& cp /usr/share/zoneinfo/${TIMEZONE} /etc/localtime \
&& echo ${TIMEZONE} > /etc/timezone \
&& apk del .tz-deps
Hi,
In order to set the proper timezone with Caddy, I've made a change to Dockerfile like the following:
Docker image building went ok.
When running the caddy-docker image, I've set
TZ=Pacific/Auckland
and I could see my local time in Caddy's access log. Please make the change so that everybody can set timezone.Thanks