summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorDaniel Axtens <dja@axtens.net>2018-03-21 09:34:15 +1100
committerDaniel Axtens <dja@axtens.net>2018-04-05 19:46:32 +1000
commit4f4ceca36710dc05b6c818237fdc86099c266234 (patch)
tree4dd498572c048f30103b9a5b51875cceb326e180 /tools
parent1d02aca4ea7e392938446a6669ce6540f09832a5 (diff)
downloadpatchwork-4f4ceca36710dc05b6c818237fdc86099c266234.tar
patchwork-4f4ceca36710dc05b6c818237fdc86099c266234.tar.gz
docker: set timezone to Australia/Canberra
The tzinfo package isn't installed in docker, which makes the default timezone UTC. This is unfortunate: the Django TZ in settings/base.py is Australia/Canberra, and having a non-UTC TZ is good for exposing faulty assumptions about what is and isn't UTC. Signed-off-by: Daniel Axtens <dja@axtens.net> Reviewed-by: Stephen Finucane <stephen@that.guru>
Diffstat (limited to 'tools')
-rw-r--r--tools/docker/Dockerfile6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/docker/Dockerfile b/tools/docker/Dockerfile
index eb6d35d..31b2aae 100644
--- a/tools/docker/Dockerfile
+++ b/tools/docker/Dockerfile
@@ -1,6 +1,7 @@
FROM ubuntu:17.10
ARG UID=1000
+ARG TZ="Australia/Canberra"
ENV PROJECT_HOME /home/patchwork/patchwork
@@ -22,12 +23,15 @@ RUN apt-get update -qq && \
python3.5-dev python3-pip python3-setuptools python3-wheel \
python3.4-dev findutils=4.4.2-7 python3.6-dev \
libmysqlclient-dev mysql-client curl unzip xvfb chromium-chromedriver \
- chromium-browser build-essential git postgresql-client && \
+ chromium-browser build-essential git postgresql-client tzdata && \
ln -s /usr/lib/chromium-browser/chromedriver /usr/bin/
# User
RUN useradd --uid=$UID --create-home patchwork
+# Timezone
+RUN rm /etc/localtime; ln -s /usr/share/zoneinfo/$TZ /etc/localtime
+
# Python requirements.
# If you update requirements, you should rebuild the container.
# entrypoint.sh will prompt you to do this.