mirror of
https://github.com/vimagick/dockerfiles.git
synced 2024-12-25 02:04:06 +02:00
update pure-ftpd
This commit is contained in:
parent
cd20a59ba3
commit
b4d8e0e021
@ -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"]
|
||||
|
@ -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
|
||||
```
|
||||
|
0
pure-ftpd/data/ftpuser/.gitkeep
Normal file
0
pure-ftpd/data/ftpuser/.gitkeep
Normal file
7
pure-ftpd/data/pure-ftpd/pure-ftpd.conf
Normal file
7
pure-ftpd/data/pure-ftpd/pure-ftpd.conf
Normal file
@ -0,0 +1,7 @@
|
||||
ChrootEveryone yes
|
||||
CreateHomeDir yes
|
||||
MaxClientsNumber 100
|
||||
MaxClientsPerIP 10
|
||||
NoAnonymous yes
|
||||
PassivePortRange 50000 50099
|
||||
PureDB /etc/pure-ftpd/pureftpd.pdb
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user