A small nginx alpine image configured to serve fpm app
3.8K
Simply nginx:alpine configured to serve fpm applications. 2 versions
pre-build from Docker hub with "automated build" option.
image name d3fk/nginx-fpm
docker pull d3fk/nginx-fpm
Docker hub repository: https://hub.docker.com/r/d3fk/nginx-fpm/
docker run -p 80:80 d3fk/nginx-fpm
This nginx container is configured to serve any upstream FastCGI content provided by an application(available on port 9000) on the same sub-network or linked (--link option); the upstream FastCGI application name should be resolved by using "fpm-app" for name by default (the name "fpm-app" of the FastCGI upstream app can be adapted with ENV vars ... see ENVIRONMENT section).
NGINX_HOST: the server hostname, its default value is set to "localhost" but you can override it with your domain name on run.
NGINX_UPSTREAM_NAME: the FastCGI upstream name that can be reached on port 9000. It can be the name of an fpm container on the same subnetwork (docker using its own DNS to resolve the name) or using the --link option (docker maintains /etc/hosts up to date on containers using the --link option) or even any "url or ip" of an fpm app that can be reached on port 9000 (it is recommended to not expose your fpm port to the world). The default value is set to "fpm-app" so that this container will by default try to reach any fpm app that resolves with the name "fpm-app" on port 9000.
docker run -p 8080:80 --env NGINX_HOST=my-domain-name.io --env NGINX_UPSTREAM_NAME=php-fpm d3fk/nginx-fpm
You can have an example of use of this container by visiting the page of a d3fk container image that proposes a "fpm" tag version, e.g.: d3fk/asciinematic
Handling of SSL certificates could easily be implemented.
Content type
Image
Digest
sha256:b1eef5f10…
Size
16 MB
Last updated
over 3 years ago
docker pull d3fk/nginx-fpm