Update Debian, and setup so we can use K8S configmaps

This commit is contained in:
Justin Hammond 2021-12-02 11:17:49 +08:00
parent 95ece7f9b5
commit 4bbf6711c4
2 changed files with 8 additions and 6 deletions

View file

@ -1,11 +1,12 @@
FROM debian:jessie
MAINTAINER David Stefan <stefda@gmail.com>
FROM debian:latest
MAINTAINER Justin Hammond <justin@dynam.ac>
LABEL org.opencontainers.image.source = "https://github.com/Fishwaldo/docker-rsync"
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -yq --no-install-recommends rsync && \
apt-get clean autoclean && \
apt-get autoremove -y && \
rm -rf /var/lib/apt/lists/*
rm -rf /var/lib/apt/lists/* && \
mkdir /etc/rsync/
EXPOSE 873
ADD ./entrypoint.sh /entrypoint.sh

View file

@ -9,8 +9,9 @@ mkdir -p ${VOLUME}
getent group ${GROUP} > /dev/null || addgroup ${GROUP}
getent passwd ${USER} > /dev/null || adduser -D -H -G ${GROUP} ${USER}
chown -R ${USER}:${GROUP} ${VOLUME}
mkdir /etc/rsync/
cat <<EOF > /etc/rsyncd.conf
cat <<EOF > /etc/rsync/rsyncd.conf
uid = ${USER}
gid = ${GROUP}
use chroot = yes
@ -24,4 +25,4 @@ reverse lookup = no
comment = docker volume
EOF
exec /usr/bin/rsync --no-detach --daemon --config /etc/rsyncd.conf
exec /usr/bin/rsync --no-detach --daemon --config /etc/rsync/rsyncd.conf --verbose