diff --git a/CHANGELOG.md b/CHANGELOG.md index aabbde3..d137435 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [1.2.0] - [2020-03-10] + +### Changed +* Bump to Duplicacy 2.4.0 and Duplicacy Web 1.2.1 + +### Added +* Ability to set timezone via `TZ` environment variable. Fixes [#2](https://github.com/ehough/docker-duplicacy/issues/2). + ## [1.1.0] - [2019-12-30] ### Changed * Bump to Duplicacy 2.3.0 and Duplicacy Web 1.1.0 diff --git a/Dockerfile b/Dockerfile index 33df4bd..a330901 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,30 @@ +# Copyright (c) 2019-2020 Eric D. Hough +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + FROM alpine:latest RUN ARCHITECTURE=linux_x64 && \ - SHA256_DUPLICACY=6b088e0a88a0ceb05336d863fffb563e4f6c35de2cdeac90bb606d019e4f5e4d && \ - SHA256_DUPLICACY_WEB=256d0164f2549428de0a527a757a0e1b5df33f85200884dbb5e85e6f01859a1c && \ - VERSION_DUPLICACY=2.3.0 && \ - VERSION_DUPLICACY_WEB=1.1.0 && \ + SHA256_DUPLICACY=162ECB3EA14EE28B2DCCB3342F0446EAB3BB0154CC7CADFB794551E81EB56CDA && \ + SHA256_DUPLICACY_WEB=9381581171503788a9c31c60ea672bf0a0f3fc7d7537f83c24b318fef009b87f && \ + VERSION_DUPLICACY=2.4.0 && \ + VERSION_DUPLICACY_WEB=1.2.1 && \ \ # ------------------------------------------------------------------------------------------ \ @@ -22,9 +42,11 @@ RUN ARCHITECTURE=linux_x64 _DIR_CONF=/etc/duplicacy && \ _DIR_CACHE=/var/cache/duplicacy && \ \ - # add ca-certificates so Duplicacy doesn't complain + # add a few packages: + # * ca-certificates - so Duplicacy doesn't complain about HTTPS + # * tzdata - so users can set timezone via TZ environment variable apk update && \ - apk add --no-cache ca-certificates && \ + apk add --no-cache ca-certificates tzdata && \ \ # download, check, and install duplicacy wget -O $_BIN_DUPLICACY "$_URL_DUPLICACY" && \ diff --git a/LICENSE b/LICENSE index fd6ecb5..139cde6 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2019 Eric D. Hough +Copyright (c) 2019-2020 Eric D. Hough Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -16,4 +16,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file +SOFTWARE. diff --git a/README.md b/README.md index 423057a..3be4c4b 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,20 @@ 1. Bind-mount a host directory into the container at `/etc/duplicacy` to view, edit, and/or backup your configuration files (i.e. `duplicacy.json` and `settings.json`). 1. Bind-mount a host directory into the container at `/var/cache/duplicacy` to retain statistics and cached data between container starts, stops, and restarts. +1. Set your container's timezone using one of the following techniques: + 1. Set the `TZ` environment variable to your desired [timezone name](https://wikipedia.org/wiki/List_of_tz_database_time_zones#List). + + `docker run -e TZ=America/LosAngeles ... erichough/duplicacy` + + 1. Bind-mount `/etc/localtime` and `/etc/timezone` into the container. e.g. + + ``` + docker run \ + -v /etc/localtime:/etc/localtime:ro \ + -v /etc/timezone:/etc/timezone:ro \ + ... \ + erichough/duplicacy + ``` 1. Add `--cap-drop=ALL` for extra security. 1. Add `--restart=always` to be able to make changes via the settings page. @@ -53,6 +67,7 @@ services: cap_drop: - ALL environment: + TZ: America/New_York MACHINE_ID: 4c601d79a045519397ade28a2f79e3d3 volumes: - /host/path/to/config:/etc/duplicacy diff --git a/entrypoint.sh b/entrypoint.sh index 684e99d..ce341e5 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,5 +1,25 @@ #!/bin/sh +# Copyright (c) 2019-2020 Eric D. Hough +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + set -e log() {