This NGINX image based on Alpine Linux
2.1K
This repository contains a Dockerfile to build a NGINX image with additional modules and features. The resulting image is based on Alpine Linux version 3.18.
The free GeoLite2 databases are available from Maxminds website (requires signing up)
To build the Docker image, use the following command:
docker build -t nginx .
To run the container based on the built image, use the following command:
docker run -d -p 80:80 -p 443:443 -v /path/to/website:/var/www/html -v /path/to/certificates:/etc/letsencrypt -v /path/to/logs:/var/log/nginx nginx
Make sure to replace /path/to/website, /path/to/certificates, and /path/to/logs with the actual paths on your host machine.
The NGINX configuration files and templates can be found in the files directory. Modify these files according to your requirements before building the Docker image.
ssl_dhparam file: This is the file used for Diffie-Hellman parameters. You can generate this file using OpenSSL tool to enhance the security of SSL/TLS connections. To generate the DH parameters, you can use the openssl command-line tool. Here's an example command to generate a 2048-bit DH parameter file:
openssl dhparam -out /etc/letsencrypt/dhparam.pem 2048
ssl_session_ticket_key file: This is the file used for session ticket keys. Session tickets are a mechanism used to optimize the SSL/TLS handshake process. You can generate this key file using the OpenSSL tool. Here's an example command:
openssl rand 80 > /etc/letsencrypt/session_ticket.key
Please note that generating DH parameter files and session ticket key files involve key material, so it's important to handle and protect these files properly. It is recommended to restrict the permissions of the files and store them in a secure location.
If you have any suggestions, improvements, or issues, feel free to create an issue or pull request in the GitHub repository.
This project is licensed under the GPLv3 License.
Content type
Image
Digest
sha256:6f9dc3178…
Size
7.3 MB
Last updated
17 days ago
docker pull hsxk/nginx