You can do something like this:
Dockerfile
:
FROM alpine
ARG url="https://github.com/gilbertchen/duplicacy/releases/download/v2.7.2/duplicacy_linux_x64_2.7.2"
WORKDIR /root/dummy/
# /mnt/duplicacy/ is where the volume will be mounted
RUN mkdir -p /mnt/duplicacy && \
wget "$url" -O /usr/local/bin/duplicacy && chmod +x /usr/local/bin/duplicacy
ADD duplicacy_preferences .duplicacy/preferences
ENTRYPOINT ["/usr/local/bin/duplicacy"]
CMD ["check", "-a", "-fossils", "-resurrect", "-files", "-chunks", "-stats", "-tabular", "-threads", "4"]
While the duplicacy_preferences
is:
[
{
"name": "default",
"id": "<Your storage ID here>",
"repository": "",
"storage": "/mnt/duplicacy/",
"encrypted": false,
"no_backup": false,
"no_restore": false,
"no_save_password": false,
"nobackup_file": "",
"keys": null,
"filters": "",
"exclude_by_attribute": false
}
]
You then build a container and put it onto Azure and use kubernate yaml config to mount your duplicacy storage volume to /mnt/duplicacy
.
Now when this container is started, it would run duplicacy check -a -fossils -resurrect -files -chunks -stats -tabular -threads 4
by default on your storage.
By checking the volume mounted in the container directly instead of connecting to a remote server, it would be much quicker, more robust and you won’t need to keep your computer running.
Edit:
I have tested this Dockerfile
locally with a fake duplicacy storage I created and it worked as expected.