diff options
| author | Patrick Lewis <pat@lo5t.com> | 2020-09-22 02:33:15 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-09-22 11:33:15 +0200 |
| commit | 3815e0df4f6a8ef2e82739bd60c428f801d26f9e (patch) | |
| tree | ba5f6098e50daad1a03b1d4823d4546f9b68cf8d | |
| parent | 868081e9597b60beb57f4a11be544bc041504400 (diff) | |
feat(Docker): add timezone settings to dockerfile (#3292)
| -rw-r--r-- | docker/authserver/Dockerfile | 13 | ||||
| -rw-r--r-- | docker/database/Dockerfile | 5 | ||||
| -rw-r--r-- | docker/worldserver/Dockerfile | 13 |
3 files changed, 29 insertions, 2 deletions
diff --git a/docker/authserver/Dockerfile b/docker/authserver/Dockerfile index 18953327e9..d7e6bc2e9a 100644 --- a/docker/authserver/Dockerfile +++ b/docker/authserver/Dockerfile @@ -1,7 +1,18 @@ FROM ubuntu:20.04 +# List of timezones: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones + +# set timezone environment variable +ENV TZ=Etc/UTC + +# set noninteractive mode so tzdata doesn't ask to set timezone on install +ENV DEBIAN_FRONTEND=noninteractive + # install the required dependencies to run the authserver -RUN apt update && apt install -y libmysqlclient-dev libssl-dev libace-6.4.5 libace-dev net-tools; +RUN apt update && apt install -y libmysqlclient-dev libssl-dev libace-6.4.5 libace-dev net-tools tzdata; + +# change timezone in container +RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && dpkg-reconfigure --frontend noninteractive tzdata HEALTHCHECK --interval=5s --timeout=15s --start-period=30s --retries=3 CMD netstat -lnpt | grep :3724 || exit 1 diff --git a/docker/database/Dockerfile b/docker/database/Dockerfile index 8754637d6a..5fd73237d7 100644 --- a/docker/database/Dockerfile +++ b/docker/database/Dockerfile @@ -16,6 +16,11 @@ RUN ./azerothcore/bin/acore-db-asm 1 FROM mysql:5.7 +# List of timezones: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones + +# set timezone environment variable +ENV TZ=Etc/UTC + ENV LANG C.UTF-8 # copy files from the previous build stage - see: https://docs.docker.com/develop/develop-images/multistage-build/ diff --git a/docker/worldserver/Dockerfile b/docker/worldserver/Dockerfile index 50f0076ec4..e208e48994 100644 --- a/docker/worldserver/Dockerfile +++ b/docker/worldserver/Dockerfile @@ -1,7 +1,18 @@ FROM ubuntu:20.04 +# List of timezones: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones + +# set timezone environment variable +ENV TZ=Etc/UTC + +# set noninteractive mode so tzdata doesn't ask to set timezone on install +ENV DEBIAN_FRONTEND=noninteractive + # install the required dependencies to run the authserver -RUN apt update && apt install -y libmysqlclient-dev libssl-dev libace-6.4.5 libace-dev libreadline-dev net-tools; +RUN apt update && apt install -y libmysqlclient-dev libssl-dev libace-6.4.5 libace-dev libreadline-dev net-tools tzdata; + +# change timezone in container +RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && dpkg-reconfigure --frontend noninteractive tzdata HEALTHCHECK --interval=5s --timeout=15s --start-period=30s --retries=3 CMD netstat -lnpt | grep :8085 || exit 1 |
