nginx:latest with a customised default.conf for reverse proxying (with SSL) to a ghost container
50K+
The official nginx:latest with a customised default.conf designed for reverse proxying (with SSL support) to a container running ghost.
Use nginx-ghost for the non-SSL version.
The Nginx configuration is also capable of supporting the renewal of SSL/TLS certificates through Let's Encrypt and its Webroot method for domain validation. The expected webroot path is /tmp/letsencrypt/www as specified in default.conf. See gordonchan/auto-letsencrypt.
$ docker run -d --link my_ghost_container:ghost gordonchan/nginx-ssl-ghost
This image assumes the hostname ghost will connect to the container running the ghost application. If this is not the correct name, you will need to create an alias as described in the example above.
We also assume the default ghost port is exposed (2368).
As per the default.conf, this image assumes the certificate and key files are located at /etc/nginx/certs/fullchain.pem and /etc/nginx/certs/privkey.pem on the container respectively. The name of the files match the ones generated by Let's Encrypt.
How do you get the files on the container?
docker cp.docker run -d -v /path/to/certs:etc/nginx/certs gordonchan/nginx-ssl-ghost.docker run -d -v certs_data:/etc/nginx/certs gordonchan/nginx-ssl-ghost.Creating a data volume gives the most flexibility as it is independent of a container's life cycle. Managing the set up with Docker Compose is ideal. See this docker-compose.yml for an example.
As per the default.conf, all HTTP requests are redirected (301 Permanent Redirect) to the HTTPS equivalent.
We are using the 'moderate' profile cipher suite recommended by Mozilla.
With the discovered weakness with Diffie-Hellman key exchange, the recommendation is generate a strong Diffie-Hellman group greater than 1024 bits (e.g. 2048 bits) or simply not support non-elliptic curve Diffie-Hellman key exchange.
A 2048-bit Diffie-Hellman group is generated when the container is first launched which may take some time.
Copyright (c) 2015 Gordon Chan. Released under the MIT License. It is free software, and may be redistributed under the terms specified in the LICENSE file.
Content type
Image
Digest
sha256:ea45f1cf6…
Size
42.6 MB
Last updated
almost 8 years ago
docker pull gordonchan/nginx-ssl-ghost