From b3bcb6fca8a281994c07d5564039f356389e9b8e Mon Sep 17 00:00:00 2001 From: William Petit Date: Sat, 24 Nov 2018 09:57:14 +0100 Subject: [PATCH] Add timezone configuration --- Dockerfile | 8 +++++++- Makefile | 1 - misc/start.sh | 1 - 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 08e8408..f6e8b5f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,12 +5,18 @@ ARG HTTPS_PROXY= ARG http_proxy= ARG https_proxy= ARG FDROIDSERVER_VERSION=1.0.10 +ARG TIMEZONE=Europe/Paris RUN apk add --no-cache \ python3 build-base freetype-dev libffi-dev \ libpng-dev py3-setuptools python3-dev libxml2-dev \ libxslt-dev openssl-dev jpeg-dev java-common \ - bash supervisor openssh inotify-tools gettext openjdk8 fastjar caddy + bash supervisor openssh inotify-tools gettext \ + openjdk8 fastjar caddy tzdata + +RUN cp /usr/share/zoneinfo/${TIMEZONE} /etc/localtime \ + && echo "${TIMEZONE}" > /etc/timezone \ + && apk del tzdata RUN ln -s /usr/bin/fastjar /usr/bin/jar RUN ln -s /usr/include/libxml2 /usr/include/libxml diff --git a/Makefile b/Makefile index c52eba4..a076294 100644 --- a/Makefile +++ b/Makefile @@ -16,7 +16,6 @@ run: -v "$(PWD)/data/repo:/fdroid/repo" \ -v "$(PWD)/data/metadata:/fdroid/metadata" \ -v "$(PWD)/data/keystore:/fdroid/keystore" \ - -v "/etc/localtime:/etc/localtime:ro" \ -e "FDROID_REPO_HOST=0.0.0.0" \ -e "FDROID_REPO_NAME=My local repo" \ -e "FDROID_REPO_DESCRIPTION=My repo description" \ diff --git a/misc/start.sh b/misc/start.sh index 41a97d8..f8a28ff 100644 --- a/misc/start.sh +++ b/misc/start.sh @@ -14,7 +14,6 @@ docker run -it -d \ -v "${PWD}/data/repo:/fdroid/repo" \ -v "${PWD}/data/metadata:/fdroid/metadata" \ -v "${PWD}/data/keystore:/fdroid/keystore" \ - -v "/etc/localtime:/etc/localtime:ro" \ -e "FDROID_REPO_HOST=${REPO_HOST}" \ -e "FDROID_REPO_EMAIL=${REPO_EMAIL}" \ -e "FDROID_REPO_NAME=${REPO_NAME}" \