Skip to content

Commit

Permalink
Merge pull request #4 from pecuchet/container_time
Browse files Browse the repository at this point in the history
Allow choice of container timezone at build
  • Loading branch information
deniszh authored Sep 22, 2017
2 parents e208491 + 616073d commit ff26f64
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.vagrant
.idea

# Vim
[._]*.s[a-w][a-z]
Expand Down
10 changes: 10 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down

0 comments on commit ff26f64

Please sign in to comment.