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

474
Visualizações
PHP, Apache and MySQL in the same Docker container (same Dockerfile)

I need an image with all 3 items in the same container, I know it is not a good practice, I know docker is solving the scalability, redundancy and availability issues by splitting services, etc. For all my projects I separate the services but for this project in specific I need all 3 services running under the same container.

So far I can run apache or mysql but not both at the same time, some issues with the entrypoints, some issues with the mysql permissions and I still haven't been able to get them all together in the same container up and running.

Has anyone faced this issue? Maybe some documentation I have missed?

Thank you

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

I've solved this before for a purely-local dev testing environment (because as you stated, this isn't normally a good practice).

What I did was start my Docker image from Alpine Linux, and then installed PHP, MySQL, and Nginx on top of it. You'll also need to COPY your source files into the container and set their appropriate permissions with chmod or chown.

Alternatively, you can use a volume as well, but depending on your OS you might run into permissions issues unless you create the same user/group in your container that owns the files on your local system.

If you'd like some inspiration, you can view the Dockerfile for the container that I've mentioned in the above.

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