add basic rsync server image

This commit is contained in:
Tony Blyler 2021-05-15 00:41:19 -04:00
parent ab7a0569a9
commit bc3edaad62
Signed by: tblyler
GPG key ID: 7F13D9A60C0D678E
3 changed files with 15 additions and 0 deletions

View file

@ -3,3 +3,5 @@ FROM alpine:3.13
RUN apk add --no-cache \
openssh-server \
rsync
RUN mkdir -p /root/.ssh && cp /etc/ssh/sshd_config /etc/default_sshd_config

View file

@ -1,2 +1,11 @@
# docker-rsync-server
This is a simple docker image definition for starting an SSH server that is used for rsyncing to volume mounts.
## Volumes
| path | description |
|----------------------------|---------------------------------------|
| /root/.ssh/authorized_keys | the ssh keys to allow for auth |
| /etc/ssh | location for SSH host keys and config |
| anywhere else | the locations available for rsync |

View file

@ -3,6 +3,10 @@ set -eu
ssh-keygen -A
if [ ! -e '/etc/ssh/sshd_config' ]; then
cp /etc/default_sshd_config /etc/ssh/sshd_config
fi
/usr/sbin/sshd
while pgrep -f /usr/sbin/sshd; do