<reponame>nitr8/docker-urbackup
FROM debian:stretch
MAINTAINER <NAME> <<EMAIL>>
ENV APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=DontWarn

RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y apt-utils gnupg wget &&\
echo 'deb http://download.opensuse.org/repositories/home:/uroni/Debian_9.0/ /' > /etc/apt/sources.list.d/urbackup-server.list &&\
wget http://download.opensuse.org/repositories/home:uroni/Debian_9.0/Release.key &&\
apt-key add - < Release.key

RUN DEBIAN_FRONTEND=noninteractive apt-get upgrade -y 

RUN echo '-----BEGIN PGP PUBLIC KEY BLOCK-----\n\
Version: GnuPG v1.4.5 (GNU/Linux)\n\
\n\
<KEY>
-----END PGP PUBLIC KEY BLOCK-----' | apt-key add -

RUN DEBIAN_FRONTEND=noninteractive apt-get update && echo "urbackup-server urbackup/backuppath string /backups" | debconf-set-selections
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --allow-unauthenticated urbackup-server btrfs-tools &&\
    rm -rf /var/lib/apt/lists/*

COPY start /usr/bin/start

EXPOSE 55413/tcp 55414/tcp 55415/tcp 35623/udp

VOLUME [ "/backups", "/var/urbackup", "/var/log", "/usr/share/urbackup" ]
ENTRYPOINT ["/usr/bin/start"]
CMD ["run"]
