Compare commits
5 Commits
v2.0
...
d50d74505c
| Author | SHA1 | Date | |
|---|---|---|---|
| d50d74505c | |||
| 8d310e4e59 | |||
| d81f3fe81b | |||
| b85c56d67e | |||
| 846f492187 |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -3,5 +3,5 @@ srv/
|
||||
config/
|
||||
logs/
|
||||
data/
|
||||
.env
|
||||
.env*
|
||||
vsftpd.pem
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
FROM debian:stable
|
||||
|
||||
LABEL maintainer="Luca Derderian <luca@wululu.de>"
|
||||
LABEL version="${VERSION:-2.0}"
|
||||
LABEL version="${VERSION:-2.1}"
|
||||
|
||||
ARG FTP_UID=48
|
||||
ARG FTP_GID=48
|
||||
|
||||
14
README.md
14
README.md
@@ -44,6 +44,18 @@ which is in the _whois_ debian package.
|
||||
|
||||
## Usage Example
|
||||
|
||||
### Docker Compose
|
||||
First, setup your .env file by copying the sample file and modifying it to suit your needs.
|
||||
```
|
||||
cp env.sample .env
|
||||
vi .env
|
||||
```
|
||||
Then run the stack
|
||||
```
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
### Docker
|
||||
```
|
||||
docker run --rm -it -p 21:21 -p 4559-4564:4559-4564 -e FTP_USER=ftp -e FTP_PASSWORD=ftp docker.io/panubo/vsftpd:latest
|
||||
```
|
||||
@@ -73,4 +85,4 @@ See [serverfault: vsftp: whu is allow_writable_chroot=YES a bad idea?](https://s
|
||||
|
||||
## Logs
|
||||
|
||||
To get the FTP logs mount `/var/log` outside of the container. For example add `-v /var/log/ftp:/var/log` to your `docker run ...` command.
|
||||
To get the FTP logs mount `/var/log` outside of the container. For example add `-v /var/log/ftp:/var/log` to your `docker run ...` command or use `docker compose`.
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
services:
|
||||
vsftpd:
|
||||
container_name: vsftpd
|
||||
image: wululu/vsftpd:${VERSION:-2.0}
|
||||
image: wululu/vsftpd:${VERSION:-2.1}
|
||||
build:
|
||||
context: .
|
||||
args:
|
||||
VERSION: ${VERSION:-2.0}
|
||||
VERSION: ${VERSION:-2.1}
|
||||
volumes:
|
||||
- ./data:/srv
|
||||
- ./config:/etc/vsftpd
|
||||
|
||||
7
entry.sh
7
entry.sh
@@ -36,13 +36,6 @@ if [[ -n "${FTP_USERS_ROOT}" ]]; then
|
||||
sed -i 's/local_root=.*/local_root=\/srv\/$USER/' /etc/vsftpd*.conf
|
||||
fi
|
||||
|
||||
# Support setting the passive address
|
||||
if [[ -n "$FTP_PASV_ADDRESS" ]]; then
|
||||
for f in /etc/vsftpd*.conf; do
|
||||
echo "pasv_address=${FTP_PASV_ADDRESS}" >> "$f"
|
||||
done
|
||||
fi
|
||||
|
||||
# Manage /srv permissions
|
||||
if [[ -n "${FTP_CHOWN_ROOT}" ]]; then
|
||||
chown ftp:ftp /srv
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
VERSION=2.0
|
||||
COMPOSE_PROJECT_NAME=vsftpd
|
||||
|
||||
VERSION=2.1
|
||||
|
||||
FTP_USER=
|
||||
FTP_PASSWORD=
|
||||
|
||||
@@ -35,5 +35,5 @@ connect_from_port_20=YES
|
||||
listen=YES
|
||||
tcp_wrappers=YES
|
||||
pasv_address=${FTP_PASV_ADDRESS}
|
||||
pasv_min_port=${FTP_PASV_MIN_PORT:-4559}
|
||||
pasv_max_port=${FTP_PASV_MAX_PORT:-4564}
|
||||
pasv_min_port=${FTP_PASV_MIN_PORT}
|
||||
pasv_max_port=${FTP_PASV_MAX_PORT}
|
||||
|
||||
@@ -35,8 +35,8 @@ connect_from_port_20=YES
|
||||
listen=YES
|
||||
tcp_wrappers=YES
|
||||
pasv_address=${FTP_PASV_ADDRESS}
|
||||
pasv_min_port=${FTP_PASV_MIN_PORT:-4559}
|
||||
pasv_max_port=${FTP_PASV_MAX_PORT:-4564}
|
||||
pasv_min_port=${FTP_PASV_MIN_PORT}
|
||||
pasv_max_port=${FTP_PASV_MAX_PORT}
|
||||
|
||||
# SSL
|
||||
ssl_enable=Yes
|
||||
|
||||
Reference in New Issue
Block a user