add basic rsync server image
This commit is contained in:
parent
ab7a0569a9
commit
bc3edaad62
3 changed files with 15 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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 |
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue