create basic Dockerfile for having an ssh server with rsync
This commit is contained in:
parent
8fcc5a84e6
commit
ab7a0569a9
4 changed files with 26 additions and 0 deletions
1
.dockerignore
Normal file
1
.dockerignore
Normal file
|
@ -0,0 +1 @@
|
|||
.git
|
5
Dockerfile
Normal file
5
Dockerfile
Normal file
|
@ -0,0 +1,5 @@
|
|||
FROM alpine:3.13
|
||||
|
||||
RUN apk add --no-cache \
|
||||
openssh-server \
|
||||
rsync
|
7
Makefile
Normal file
7
Makefile
Normal file
|
@ -0,0 +1,7 @@
|
|||
.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
|
13
entrypoint.sh
Normal file
13
entrypoint.sh
Normal file
|
@ -0,0 +1,13 @@
|
|||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
ssh-keygen -A
|
||||
|
||||
/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