Skip to content

Commit

Permalink
Merge pull request #15 from woblerr/switch_to_utc
Browse files Browse the repository at this point in the history
Switch default timezone to UTC.
  • Loading branch information
woblerr authored Mar 21, 2022
2 parents c0d9bdb + e1603c4 commit cab5a18
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ FROM ubuntu:20.04

ARG REPO_BUILD_TAG

ENV TZ="Europe/Moscow" \
ENV TZ="Etc/UTC" \
BACKREST_USER="pgbackrest" \
BACKREST_UID=2001 \
BACKREST_GROUP="pgbackrest" \
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.alpine
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ARG BACKREST_VERSION
ARG BACKREST_COMPLETION_VERSION
ARG REPO_BUILD_TAG

ENV TZ="Europe/Moscow" \
ENV TZ="Etc/UTC" \
BACKREST_USER="pgbackrest" \
BACKREST_UID=2001 \
BACKREST_GROUP="pgbackrest" \
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ The image contains [pgbackrest-bash-completion](https://github.com/woblerr/pgbac

Environment variables supported by this image:

* `TZ` - container's time zone, default `Europe/Moscow`;
* `TZ` - container's time zone, default `Etc/UTC`;
* `BACKREST_USER` - non-root user name for execution of the command, default `pgbackrest`;
* `BACKREST_UID` - UID of internal `${BACKREST_USER}` user, default `2001`;
* `BACKREST_GROUP` - group name of internal `${BACKREST_USER}` user, default `pgbackrest`;
Expand Down
2 changes: 1 addition & 1 deletion files/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ if [ "${uid}" = "0" ]; then
# Exec pgBackRest from specific user.
backrest_command="gosu ${BACKREST_USER} pgbackrest"
# Custom time zone.
if [ "${TZ}" != "Europe/Moscow" ]; then
if [ "${TZ}" != "Etc/UTC" ]; then
cp /usr/share/zoneinfo/${TZ} /etc/localtime
echo "${TZ}" > /etc/timezone
fi
Expand Down

0 comments on commit cab5a18

Please sign in to comment.