PHP and nginx running in a single Container for Ease of Use
2.2K
NGINX and PHP running in a Docker Container.
Special Features:
I'm completely aware that it is somewhat against the Docker philosophy to run both parts in a single container. But what would be the benefits of splitting them apart?
The benefits of combining both?
Ease of use. No hassles with orchestration. You just need a single instance? Spin it up with one docker command including port mapping(s) and binding to an external document root and you are done. Tear it down with one command. After all it's just a black box. It's only a minor technical detail that there are more than one process involved. You wouldn't separate the nginx master from it's workers either, would you? Php is only a different kind of worker.
Points (2) and (3) can be further combined by a system-wide messaging system. It shouldn't concern the single container who is interested in its logs or metrics. Just tag everything correctly (different topics or queues or whatever) and push it into the messaging system.
Apache Kafka comes to my mind ...
For generic usage informations please examine the README file of the base image.
Content type
Image
Digest
sha256:f5c919388…
Size
115.3 MB
Last updated
about 11 years ago
docker pull sys42/docker-nginx-php-fpm