Best approach for FTP server setting for php/mysql/Wordpress webserver


I have an YML file where i have setup a PHP/MYSQL webserver.
On this server I have installed Wordpress and everything works well.

Now I would like to integrated a FTP server to this stack.

I was just wondering what would be the best way to do that ?
add another docker (FTP) to my stack, or just in my PHP docker script to add a RUN command to install VSFTP for example ?
All my website file are in /var/www/public_html of my PHP docker

Looks like you try to organize you containers the same way like people used to work with vm’s.

The docker way would be to actualy create a new wordpress image that includes your updated code and deploy it.

If you still want to apply old world patterns to container, you can use a dedicated ftp(s) or preferebly sftp container to upload files to a volume which is shared with your wordpress container. Of course you will want to have the upload server in an isolated container.

If you are not familiar with passive mode ftp and how to configure it, I suggest to research about it. Also passive mode will require a portrange to be published on the container, which will slow down container creation a lot. sftp is easier to setup and only requires a single published port.