One line command docker run -d \ -v /share:/home/vsftpd \ -p 20:20 \ -p 21:21 \ -p 21100-21110:21100-21110 \ -e FTP_USER=zhaoolee \ -e FTP_PASS=eelooahz \ -e PASV_ADDRESS=47.106.108.135 \ -e PASV_MIN_PORT=21100 \ -e PASV_MAX_PORT=21100 \ --name zhaoolee_vsftpd \ --restart=always \ fauria/vsftpd Parameter explanation: -d means the new container runs in the background -v means setting directory mapping. Example: -v /share:/home/vsftpd maps the host's /share directory to the docker container's /home/vsftpd (after user zhaoolee logs in, the program will automatically create a zhaoolee folder in the /home/vsftpd folder to store uploaded files) -p is the mapping port -p 20:20 means mapping the host port 20 to the docker container's port 20, -p 21:21 means mapping the host port 21 to the docker container's port 21, -p 21100-21110:21100-21110 means mapping the host's ports 21100 to 21110 to the docker container's ports 21100 to 21110 Closely related to the port are two connection modes: active mode and passive mode.
-e means to append parameters FTP_USER is the FTP login user name, setting example FTP_USER=zhaoolee FTP_PASS is the ftp login password, setting example FTP_PASS=eelooahz PASV_ADDRESS is the external network IP address, for example PASV_ADDRESS=104.243.20.148 (very important: you must bind the host's external IP address here, otherwise you will not be able to connect later. Zhaoolee spent a long time adjusting this...) PASV_MIN_PORT is the minimum port number for the client to connect to the server, which is 21100 (the minimum port number for the server in passive mode) PASV_MAX_PORT is the maximum port number for the client to connect to the server, which is 21110 (the maximum port number for the server in passive mode) --name zhaoolee_vsftpd means the container name is zhaoolee_vsftpd (this name can be customized) --restart=always means restart is possible fauria/vsftpd represents the image name Test with Alibaba Cloud Open port 20, port 21, port range 21100-21110 Create a container Connection test (FillZilla download link: https://filezilla-project.org/download.php?type=client) Upload files via ftp summary: FTP is a commonly used service. Here we use vsftp's docker method to complete the construction, and it can be done with one line of command. The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. You may also be interested in:
|
<<: Some slightly more complex usage example codes in mysql
>>: How to change the database data storage directory in MySQL
1. What is Docker? (1) Docker is an open source t...
EXPLAIN shows how MySQL uses indexes to process s...
Docker provides multiple networks such as bridge,...
Preface During the stress test, if the most direc...
Recently I found that even if the TD of the table ...
background We can use react-color to implement th...
This article example shares the specific code of ...
Preface: Use debugbar to view document code in iet...
Relative path - a directory path established based...
Table of contents Project Background Improvement ...
Preface Since vue3.0 was officially launched, man...
Nginx can use its reverse proxy function to imple...
Table of contents introduce Prepare Download syst...
The tutorial for installing OpenStack Ussuri with...
Purchase Certificate You can purchase it from Ali...