Preformatted text
Here is a docker file to build for 2.5.18. Using ubuntu as it libc6 2.3+ is in natively from Debian. also install libguestfs-tools which adds some space overall.
on a linux docker host you can build it using this command:
docker build . -f Dockerfile -t urbackup-2.5.18:beta
copy Dockerfile and entrypoint.sh into the same directory as running the docker build command. This is modified to only work with 2.5.18 as the location is hardcoded. I am testing MacOSX client so why not?
Dockerfile
# Base image can be specified by --build-arg IMAGE_ARCH= ; defaults to debian:stretch
ARG IMAGE_ARCH=ubuntu
FROM ${IMAGE_ARCH}
ENV DEBIAN_FRONTEND=noninteractive
ARG VERSION=2.5.18%20beta
ENV VERSION ${VERSION}
ARG ARCH=amd64
ARG FILE_SUBDIR=/
ARG QEMU_ARCH
ENV FILE urbackup-server_2.5.18_amd64.deb
#ENV URL https://hndl.urbackup.org/Server/${VERSION}/${FILE_SUBDIR}${FILE}
ENV URL https://beta.urbackup.org/Server/2.5.18%20beta/urbackup-server_2.5.18_amd64.deb
# Copy the entrypoint-script and the emulator needed for autobuild function of DockerHub
COPY entrypoint.sh qemu-${QEMU_ARCH}-static* /usr/bin/
ADD ${URL} /root/${FILE}
# Install UrBackup-server
RUN apt-get update \
&& echo "urbackup-server urbackup/backuppath string /backups" | debconf-set-selections \
&& apt-get install -y --no-install-recommends /root/${FILE} btrfs-progs \
&& apt-get install -y --no-install-recommends /root/${FILE} libguestfs-tools \
&& rm /root/${FILE} \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Backing up www-folder
RUN mkdir /web-backup && cp -R /usr/share/urbackup/* /web-backup
# Making entrypoint-script executable
RUN chmod +x /usr/bin/entrypoint.sh
EXPOSE 55413
EXPOSE 55414
EXPOSE 55415
EXPOSE 35623/udp
# /usr/share/urbackup will not be exported to a volume by default, but it still can be bind mounted
VOLUME [ "/var/urbackup", "/var/log", "/backups" ]
ENTRYPOINT ["/usr/bin/entrypoint.sh"]
CMD ["run"]
Here is the entrypoint.sh (not modified from the original)
entrypoint.sh
#!/bin/bash
set -e
# Copy www-folder back, if folder is bind-mounted
cp -R /web-backup/* /usr/share/urbackup
# Specifying backup-folder location
echo "/backups" > /var/urbackup/backupfolder
# Giving the user and group "urbackup" the provided UID/GID
if [[ $PUID != "" ]]
then
usermod -u $PUID -o urbackup
else
usermod -u 101 -o urbackup
fi
if [[ $PGID != "" ]]
then
groupmod -g $PGID -o urbackup
else
groupmod -g 101 -o urbackup
fi
chown urbackup:urbackup /backups
chown urbackup:urbackup /var/urbackup
exec urbackupsrv "$@"
Thanks,
Jim