Skip to content

Commit

Permalink
Use ENV_VARS to set timezone
Browse files Browse the repository at this point in the history
  • Loading branch information
rubensa committed Nov 25, 2019
1 parent f4c1609 commit 716f974
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ GROUP_ID=$(id -g)
prepare_docker_timezone() {
# https://www.waysquare.com/how-to-change-docker-timezone/
MOUNTS+=" --mount type=bind,source=/etc/timezone,target=/etc/timezone,readonly"
MOUNTS+=" --mount type=bind,source=/etc/localtime,target=/etc/localtime,readonly"
ENV_VARS+=" --env=TZ=$(cat /etc/timezone)"
}
prepare_docker_user_and_group() {
Expand Down
3 changes: 1 addition & 2 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ GROUP_ID=$(id -g)

prepare_docker_timezone() {
# https://www.waysquare.com/how-to-change-docker-timezone/
MOUNTS+=" --mount type=bind,source=/etc/timezone,target=/etc/timezone,readonly"
MOUNTS+=" --mount type=bind,source=/etc/localtime,target=/etc/localtime,readonly"
ENV_VARS+=" --env=TZ=$(cat /etc/timezone)"
}

prepare_docker_user_and_group() {
Expand Down

0 comments on commit 716f974

Please sign in to comment.