-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathREADME
More file actions
60 lines (47 loc) · 1.57 KB
/
README
File metadata and controls
60 lines (47 loc) · 1.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# docker-proftpd
A proftpd docker container with mysql, quota and sftp modules based on alpine.
## Usage
### without compilation
Create a docker-compose.yml in root project folder. Fill free to change mysql credentials.
```
proftpd:
image: pockost/proftpd
volumes:
- ./proftpd.conf:/usr/local/etc/proftpd.conf
- ./data/ftp:/data
- ./data/ssh:/etc/ssh
links:
- mysql
ports:
- "20:20"
- "21:21"
- "22:22"
- "60000-60100:60000-60100"
mysql:
image: mariadb
ports:
- 3306:3306
environment:
- MYSQL_ROOT_PASSWORD=password
- MYSQL_DATABASE=proftpd
```
Get a proftpd configuration file (like this one : https://github.com/pockost/docker-proftpd/blob/master/sftp/proftpd.conf) and run the containers.
```
$ curl https://raw.githubusercontent.com/pockost/docker-proftpd/master/sftp/proftpd.conf > proftpd.conf
```
Start the database and Create proftpd database and ssh key
```
$ docker-compose up -d mysql
$ curl -sL https://raw.githubusercontent.com/pockost/docker-proftpd/master/sftp/create_table.sql | mysql --protocol=tcp -hlocalhost -uroot -p
$ ssh-keygen -f ./data/ssh/ssh_host_rsa_key -N '' -t rsa
$ ssh-keygen -f ./data/ssh/ssh_host_dsa_key -N '' -t dsa
$ docker-compose up -d proftpd
```
Add some user. You can find exemple in here : https://github.com/pockost/docker-proftpd/blob/master/sftp/create_user.sql
### with compilation
cd sftp
docker-compose build
docker-compose up -d
cat create_table.sql | mysql --protocol=tcp -hlocalhost -uroot -p
## Note
You can find container with only quota or mysql,quota image in quota or mysql folder.