From 616073d891d6c338f082abb52d47ca2652fe9cfe Mon Sep 17 00:00:00 2001 From: Arnaud Coolsaet Date: Fri, 22 Sep 2017 09:39:01 +0200 Subject: [PATCH] allow choice of container timezone at build --- .gitignore | 1 + Dockerfile | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/.gitignore b/.gitignore index 0f54bcd..a757d28 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ .vagrant +.idea # Vim [._]*.s[a-w][a-z] diff --git a/Dockerfile b/Dockerfile index 36676a0..277ed14 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,6 +22,16 @@ RUN apt-get -y update \ nodejs \ && rm -rf /var/lib/apt/lists/* +# choose a timezone at build-time +# use `--build-arg CONTAINER_TIMEZONE=Europe/Brussels` in `docker build` +ARG CONTAINER_TIMEZONE +ENV DEBIAN_FRONTEND noninteractive + +RUN if [ ! -z "${CONTAINER_TIMEZONE}" ]; \ + then ln -sf /usr/share/zoneinfo/$CONTAINER_TIMEZONE /etc/localtime && \ + dpkg-reconfigure -f noninteractive tzdata; \ + fi + # fix python dependencies (LTS Django and newer memcached/txAMQP) RUN pip install --upgrade pip && \ pip install django==1.8.18 \