Skip to content

Commit 07df37a

Browse files
author
themadmrj
authored
Merge pull request #4 from stefanmb/dockerfile-fix-tz
Fix timezone setting in Dockerfile
2 parents 8ad6067 + 3456577 commit 07df37a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Dockerfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
# ircapp
22
#
3-
# BUILD: docker build --no-cache --rm -t ircapp .
3+
# BUILD: docker build --no-cache --build-arg TIMEZONE=`cat /etc/timezone` --rm -t ircapp .
44
# RUN: docker run --restart="unless-stopped" --name ircapp -p 127.0.0.1:8083:8020 -v $DB_ROOT:/root/.IRCapp -v $DOWNLOAD_ROOT:/root/Downloads --detach=true ircapp
55

66
FROM phusion/baseimage:0.9.15
77

8+
# Default
9+
ARG TIMEZONE=Europe/Paris
10+
811
# Use baseimage-docker's init system.
912
CMD ["/sbin/my_init"]
1013

@@ -19,7 +22,7 @@ COPY . /ircapp
1922
RUN mkdir $HOME/.IRCapp
2023

2124
# Fixup timezone, if necessary.
22-
RUN cd /ircapp; sed -i "/^timezone.*/c\timezone = $(cat /etc/timezone)" config.ini
25+
RUN cd /ircapp; sed -i "/^timezone.*/c\timezone = $TIMEZONE" config.ini
2326

2427
# Do not run in debug mode, if necessary.
2528
RUN cd /ircapp; sed -i "/^DEBUG = True/c\DEBUG = False" settings.py

0 commit comments

Comments
 (0)