Compare commits
No commits in common. "bc3edaad62242ea3c04d35ebdbc222d150d777e5" and "8fcc5a84e6c43f40509a65706151e09b86d9d89a" have entirely different histories.
bc3edaad62
...
8fcc5a84e6
5 changed files with 0 additions and 41 deletions
|
@ -1 +0,0 @@
|
||||||
.git
|
|
|
@ -1,7 +0,0 @@
|
||||||
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
|
|
7
Makefile
7
Makefile
|
@ -1,7 +0,0 @@
|
||||||
.PHONY: build
|
|
||||||
build:
|
|
||||||
docker build -t registry.0xdad.com/rsync-ssh-server:latest .
|
|
||||||
|
|
||||||
.PHONY: deploy
|
|
||||||
deploy: build
|
|
||||||
docker push registry.0xdad.com/rsync-ssh-server:latest
|
|
|
@ -1,11 +1,2 @@
|
||||||
# docker-rsync-server
|
# 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 |
|
|
||||||
|
|
|
@ -1,17 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
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
|
|
||||||
sleep 5
|
|
||||||
done
|
|
||||||
|
|
||||||
>&2 echo 'SSHD is no longer running'
|
|
||||||
exit 1
|
|
Loading…
Reference in a new issue