Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

397
Views
FTP access inside docker for a PHP envrionnement

I have a web server with multiple PHP website. I push all my updates through FTP.

I intend to move to a more containerized environnement without changing to much of my current basic workflow.

I would like to deploy each of my website in a Docker container. The database for all the website would be in another container. I will have a Docker as a reverse proxy.

To update my website, i have two ideas :

  • Set up an FTP access in the container so i can update it directly
  • Set up a shared directories with the host through volume, so i can set up FTP access from the host.

What do you think of it ?

Thanks for your help

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Changing the code inside a running container, or at all, is against docker best practices, as containers are designed to be ephemeral.

A better idea would be to rebuild the image every time you update the code, allowing the containers to stay ephemeral, and making it easier to scale. You could implement this through CI/CD, but that is out of the scope of this question.

If you really want to continue with the idea of ftp still, it's a good idea to have one container with an ftp service in it, and another one with the web server in, as containers should have only one concern.

If your FTP server image is my/ftp-image and your web server is my/web-server-image, then you can start your containers like this:

docker run -itd --name my-web-server -p 80:80 -v files_volume_name_here:/path/to/files/in/container my/web-server-image
docker run -itd --name my-ftp-server [ports for ftp server here] -v files_volume_name_here:/path/to/files/in/container my/ftp-image
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!