Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

398
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda