mirror of
https://github.com/borgbase/ansible-role-borgbackup.git
synced 2024-11-19 19:07:42 +01:00
15 lines
605 B
Docker
15 lines
605 B
Docker
|
FROM ghcr.io/borgmatic-collective/borgmatic:{{ borgmatic_docker_tag }}
|
||
|
|
||
|
LABEL "ansible_borgmatic_managed"="1"
|
||
|
|
||
|
COPY config.yaml /etc/borgmatic/{{ borgmatic_config_name }}
|
||
|
|
||
|
# Those keys will be copied at /root/.ssh at runtime. This is required because of the anom volumes defined in the upstream image
|
||
|
ARG PUBLIC_KEY=""
|
||
|
ARG PRIVATE_KEY=""
|
||
|
RUN if [ ! -z "$PUBLIC_KEY" ]; then echo "$PUBLIC_KEY" > /{{ borg_ssh_key_name}}.pub; fi
|
||
|
RUN if [ ! -z "$PRIVATE_KEY" ]; then echo "$PRIVATE_KEY" > /{{ borg_ssh_key_name}}; fi
|
||
|
COPY ansible_entry.sh /
|
||
|
RUN chmod 700 /ansible_entry.sh
|
||
|
|
||
|
ENTRYPOINT [ "/ansible_entry.sh" ]
|