Switch from entrypoint to start command to allow exec of other scripts

This commit is contained in:
ViViDboarder 2018-05-20 20:34:48 -07:00
父節點 707b8f304b
當前提交 947dc939f2
共有 6 個文件被更改,包括 13 次插入11 次删除

查看文件

@ -44,8 +44,8 @@ ENV FULL_CRON_SCHEDULE=""
ENV VERIFY_CRON_SCHEDULE=""
ADD backup.sh /
ADD entrypoint.sh /
ADD restore.sh /
ADD start.sh /
ADD verify.sh /
ENTRYPOINT [ "/entrypoint.sh" ]
CMD [ "/start.sh" ]

查看文件

@ -44,8 +44,8 @@ ENV FULL_CRON_SCHEDULE=""
ENV VERIFY_CRON_SCHEDULE=""
ADD backup.sh /
ADD entrypoint.sh /
ADD restore.sh /
ADD start.sh /
ADD verify.sh /
ENTRYPOINT [ "/entrypoint.sh" ]
CMD [ "/start.sh" ]

查看文件

@ -17,9 +17,9 @@ Mount any directories you'd like to back up as a volume and run
|CRON_SCHEDULE| |If you want to periodic incremental backups on a schedule, provide it here. By default we just backup once and exit|
|FLOCK_WAIT|60|Seconds to wait for a lock before skipping a backup|
|FTP_PASSWORD| |Used to provide passwords for some backends. May not work without an attached TTY|
|FULL_CRON_SCHEDULE| |If you want to periodic full backups on a schedule, provide it here. This requires an incremental cron schedule too.|
|FULL_CRON_SCHEDULE| |If you want to periodic full backups on a schedule, provide it here. This requires an incremental cron schedule too|
|GPG_KEY_ID| |The ID of the key you wish to use. See [Encryption](#encryption) section below|
|OPT_ARGUMENTS| |Any additional arguments to provide to the duplicity backup command. These can also be provided as additional arguments via the command line|
|OPT_ARGUMENTS| |Any additional arguments to provide to the duplicity backup command|
|PASSPHRASE|Correct.Horse.Battery.Staple|Passphrase to use for GPG|
|PATH_TO_BACKUP|/data|The path to the directory you wish to backup. If you want to backup multiple, see the [tip below](#backing-up-more-than-one-source-directory)|
|RESTORE_ON_EMPTY_START| |Set this to "true" and if the `$PATH_TO_BACKUP` is empty, it will restore the latest backup. This can be used for auto recovery from lost data|
@ -27,7 +27,7 @@ Mount any directories you'd like to back up as a volume and run
|VERIFY_CRON_SCHEDULE| |If you want to verify your backups on a schedule, provide it here|
## Encryption
Add a ro mount to your `~/.gnupg` directory and then provide the `GPG_KEY_ID` as an environment variable. The key will be used to sign and encrypt your files before sending to the backup destination.
By default Duplicity will use a symettric encryption using just your passphrase. If you wish to use a GPG key, you can add a ro mount to your `~/.gnupg` directory and then provide the `GPG_KEY_ID` as an environment variable. The key will be used to sign and encrypt your files before sending to the backup destination.
Need to generate a key? Install `gnupg` and run `gnupg --gen-key`

查看文件

@ -1,10 +1,12 @@
version: '2'
services:
duplicity:
build: .
build:
context: .
dockerfile: Dockerfile.ubuntu
volumes:
- ~/my-backups:/backups
- ~/my-data:/data:ro
- ./my-backups:/backups
- ./my-data:/data:ro
environment:
PASSPHRASE: Correct.Horse.Battery.Staple
CLEANUP_COMMAND: remove-older-than 5m

查看文件

@ -45,7 +45,7 @@ else
test -f /data/test.txt && exit 1 || echo "Gone"
echo "Simulate a restart with RESTORE_ON_EMPTY_START..."
RESTORE_ON_EMPTY_START=true /entrypoint.sh
RESTORE_ON_EMPTY_START=true /start.sh
echo "Verify restore happened..."
test -f /data/test.txt