1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-11-24 08:52:31 +02:00

update pure-ftpd

This commit is contained in:
kev 2019-10-08 17:50:31 +08:00
parent cd20a59ba3
commit b4d8e0e021
5 changed files with 17 additions and 12 deletions

View File

@ -2,7 +2,7 @@
# Dockerfile for pure-ftpd
#
FROM debian:jessie
FROM debian:buster
MAINTAINER kev <noreply@easypi.pro>
RUN set -xe \
@ -15,4 +15,5 @@ RUN set -xe \
EXPOSE 21
VOLUME /home/ftpuser /etc/pure-ftpd
CMD ["pure-ftpd", "--login", "puredb:/etc/pure-ftpd/pureftpd.pdb", "--createhomedir"]
ENTRYPOINT ["pure-ftpd"]
CMD ["/etc/pure-ftpd/pureftpd.conf"]

View File

@ -12,10 +12,9 @@ unique useful features for personal users as well as hosting providers.
## ~/fig/pureftpd/docker-compose.yml
```yaml
pureftpd:
pure-ftpd:
image: vimagick/pure-ftpd
ports:
- "21:21"
net: host
volumes:
- ./data/ftpuser:/home/ftpuser
- ./data/pure-ftpd:/etc/pure-ftpd
@ -23,16 +22,14 @@ pureftpd:
restart: always
```
> We only need to expose port `21` to accept client ftp connection.
> Pure-FTPd will open random port to accept client ftp-data connection.
> At this time, host machine is a router for DNAT.
> Please config firewall according to `PassivePortRange`.
## server
```bash
$ cd ~/fig/pureftpd/
$ cd ~/fig/pure-ftpd/
$ docker-compose up -d
$ docker-compose exec pureftpd bash
$ docker-compose exec pure-ftpd bash
>>> pure-pw useradd kev -u ftpuser -d /home/ftpuser/kev -t 1024 -T 1024 -y 1 -m
>>> pure-pw list
>>> pure-pw show kev
@ -48,6 +45,7 @@ $ tree -F
│   └── kev/
│   └── file.txt
└── pure-ftpd/
├── pure-ftpd.conf
├── pureftpd.passwd
└── pureftpd.pdb
```

View File

View File

@ -0,0 +1,7 @@
ChrootEveryone yes
CreateHomeDir yes
MaxClientsNumber 100
MaxClientsPerIP 10
NoAnonymous yes
PassivePortRange 50000 50099
PureDB /etc/pure-ftpd/pureftpd.pdb

View File

@ -1,7 +1,6 @@
pure-ftpd:
image: vimagick/pure-ftpd
ports:
- "21:21"
net: host
volumes:
- ./data/ftpuser:/home/ftpuser
- ./data/pure-ftpd:/etc/pure-ftpd