Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.idea
logs/*
10 changes: 3 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
FROM centos:7
FROM quay.io/centos/centos:stream9

ARG USER_ID=14
ARG GROUP_ID=50

MAINTAINER Fer Uria <[email protected]>
LABEL Description="vsftpd Docker image based on Centos 7. Supports passive mode and virtual users." \
LABEL Description="vsftpd Docker image based on Centos 9. Supports passive mode and virtual users." \
License="Apache License 2.0" \
Usage="docker run -d -p [HOST PORT NUMBER]:21 -v [HOST FTP HOME]:/home/vsftpd fauria/vsftpd" \
Version="1.0"

RUN yum -y update && yum clean all
RUN yum install -y \
vsftpd \
db4-utils \
db4 \
iproute && yum clean all
RUN yum install -y vsftpd libdb-utils iproute && yum clean all

RUN usermod -u ${USER_ID} ftp
RUN groupmod -g ${GROUP_ID} ftp
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

This Docker container implements a vsftpd server, with the following features:

* Centos 7 base image.
* vsftpd 3.0
* Centos 9 base image.
* vsftpd 3.0.3
* Virtual users
* Passive mode
* Logging to a file or `STDOUT`.
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ services:
- 21100-21110:21100-21110
volumes:
- ./home:/home/vsftpd
- ./logs:/var/log/vsftpd
- ./logs/vsftpd.log:/var/log/vsftpd.log
8 changes: 6 additions & 2 deletions vsftpd.conf
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,19 @@ allow_writeable_chroot=YES
hide_ids=YES

## Enable logging
dual_log_enable=YES
log_ftp_protocol=NO
vsftpd_log_file=/var/log/vsftpd/vsftpd.log
xferlog_enable=YES
xferlog_file=/var/log/vsftpd/vsftpd.log
xferlog_std_format=YES
xferlog_file=/var/log/vsftpd/xferlog

## Enable active mode
port_enable=YES
connect_from_port_20=YES
ftp_data_port=20

## Disable seccomp filter sanboxing
## Disable seccomp filter sanboxing
seccomp_sandbox=NO

### Variables set at container runtime