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
eureka: 1. Build a JDK image Start the eureka con...
A few days ago, I wrote an article about using CS...
Scenario Suppose there are 10 requests, but the m...
Table of contents 1. What is the use of provide/i...
Table of contents 1. Comparison with Vue2 1. New ...
This article shares the installation steps and us...
Table of contents 1. Parent components and child ...
Table of contents How to install and configure To...
Custom Image FAQ How to view the data disk? You c...
It can be referenced through CDN (Content Delivery...
Table of contents What is nginx 1. Download the r...
[LeetCode] 197.Rising Temperature Given a Weather...
I had nothing to do, so I bought the cheapest Ali...
XHTML defines three document type declarations. T...
Windows 10 now supports Linux subsystem, saying g...