TimeZone: fix inverted check of TZ

and add a clarification to README.
  On Ubuntu 16.04.3, mounting /etc/localtime from host to container
does not work. The container exits with error in entrypoint.sh.
This commit is contained in:
Magnus Eriksson 2017-09-02 18:45:26 +02:00
parent a6002d2674
commit 19c7d167f5
2 changed files with 2 additions and 2 deletions

View File

@ -239,7 +239,7 @@ docker run \
adferrand/backuppc adferrand/backuppc
``` ```
Alternatively, you can sync the container timezone to its host by mounting the host file `/etc/localtime` to the container path `/etc/localtime`. Alternatively, depending on the host OS, you can sync the container timezone to its host by mounting the host file `/etc/localtime` to the container path `/etc/localtime`.
```bash ```bash
docker run \ docker run \

View File

@ -6,7 +6,7 @@ if [ -f /firstrun ]; then
echo 'If exist, configuration and data will be reused and upgraded as needed.' echo 'If exist, configuration and data will be reused and upgraded as needed.'
# Configure timezone if needed # Configure timezone if needed
if [ -z "$TZ" ]; then if [ -n "$TZ" ]; then
cp /usr/share/zoneinfo/$TZ /etc/localtime cp /usr/share/zoneinfo/$TZ /etc/localtime
fi fi