Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
ehough committed Mar 10, 2020
2 parents 88600d6 + 01af86d commit 334d954
Show file tree
Hide file tree
Showing 5 changed files with 73 additions and 8 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
34 changes: 28 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,30 @@
# Copyright (c) 2019-2020 Eric D. Hough <eric@tubepress.com>
#
# 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 && \
\
# ------------------------------------------------------------------------------------------
\
Expand All @@ -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" && \
Expand Down
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2019 Eric D. Hough <eric@tubepress.com>
Copyright (c) 2019-2020 Eric D. Hough <eric@tubepress.com>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -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.
SOFTWARE.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -53,6 +67,7 @@ services:
cap_drop:
- ALL
environment:
TZ: America/New_York
MACHINE_ID: 4c601d79a045519397ade28a2f79e3d3
volumes:
- /host/path/to/config:/etc/duplicacy
Expand Down
20 changes: 20 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
#!/bin/sh

# Copyright (c) 2019-2020 Eric D. Hough <eric@tubepress.com>
#
# 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() {
Expand Down

0 comments on commit 334d954

Please sign in to comment.