A simple FTP server, using
vsftpd
.
To start a container, with data stored in /data
on the host, use the
following:
podman build -t vsftpd .
podman run \
--detach \
--env FTP_PASS=123 \
--env FTP_USER=user \
--name my-ftp-server \
--publish 20-21:20-21/tcp \
--publish 40000-40009:40000-40009/tcp \ # For passive mode transfers
--volume users.txt:/etc/vsftpd/users.txt \ # Add virtual users
--volume /data:/home/user \
vsftpd
The users.txt file should contain an even number of lines, with each pair representing a username and password. For example:
user1
password1
user2
password2