prepare for k3s

This commit is contained in:
Sebastian Hugentobler 2021-09-28 15:55:15 +02:00
parent 970da1228c
commit 98dc1fb1a5
Signed by: shu
GPG Key ID: BB32CF3CA052C2F0
6 changed files with 19 additions and 16 deletions

View File

@ -20,6 +20,6 @@ ADD /rootfs /
WORKDIR /
VOLUME /etc/proftpd/keys /var/lib/ftp/data
VOLUME /var/lib/ftp/data
EXPOSE 22
EXPOSE 2222

View File

@ -2,7 +2,19 @@ File access with [ProFTPD](http://www.proftpd.org/) over sftp and a static user/
# Volumes
- `/var/lib/ftp/data`: root directory for files
- `/etc/proftpd/keys`: ssh key files
# Files
## /etc/proftpd/keys/dhparams.pem
```
openssl dhparam -outform PEM -5
```
## /etc/proftpd/keys/ssh_key
```
ssh-keygen -b 2048 -t ed25519 -q -N "" -f ./ssh
cat ./ssh
```
# Environment Variables
## SERVER_NAME
@ -25,5 +37,6 @@ Uid for the static user.
## STATIC_GID
Gid for the static user.
# Ports
- 22
- 2222

View File

@ -3,7 +3,7 @@ Include /etc/proftpd/modules.d/*.conf
ServerName "{{getenv "SERVER_NAME"}}"
ServerType standalone
DefaultServer on
Port 22
Port 2222
UseIPv6 off
Umask {{ getenv "UMASK" "006 007" }}
MaxInstances 30
@ -27,6 +27,6 @@ AuthUserFile /etc/proftpd/passwd
SFTPEngine on
SFTPAuthMethods password
SFTPDHParamFile /etc/proftpd/keys/dhparams.pem
SFTPHostKey /etc/proftpd/keys/ssh_rsa_key
SFTPHostKey /etc/proftpd/keys/ssh_key
SFTPOptions IgnoreSCPUploadPerms IgnoreSFTPUploadPerms
</IfModule>

View File

@ -1,5 +0,0 @@
#!/usr/bin/with-contenv sh
if [ ! -f /etc/proftpd/keys/dhparams.pem ]; then
openssl dhparam -outform PEM -5 nbits >> /etc/proftpd/keys/dhparams.pem
fi

View File

@ -1,5 +0,0 @@
#!/usr/bin/with-contenv sh
if [ ! -f /etc/proftpd/keys/ssh_rsa_key ]; then
ssh-keygen -b 2048 -t rsa -f /etc/proftpd/keys/ssh_rsa_key -q -N ""
fi