1fa132ae719bb5139ef43f05c0f88fcdb8af934b
🏔️ Alpine - Nginx
Nginx base image with additional plugins and custom compiled
SYNOPSIS
What can I do with this? This image will serve as a base for nginx related images that need a high-performance webserver. It can also be used stand alone as a webserver or reverse proxy.
VOLUMES
- /nginx/etc - Directory of vHost config, must end in *.conf (set in /etc/nginx/nginx.conf)
- /nginx/www - Directory of webroot for vHost
- /nginx/ssl - Directory of SSL certificates
RUN
docker run --name nginx \
-v .../etc:/nginx/etc \
-v .../www:/nginx/www \
-v .../ssl:/nginx/ssl \
-d 11notes/nginx:[tag]
DEFAULT SETTINGS
Parameter | Value | Description |
---|---|---|
user |
docker | user docker |
uid |
1000 | user id 1000 |
gid |
1000 | group id 1000 |
home |
/nginx | home directory of user docker |
ENVIRONMENT
Parameter | Value | Default |
---|---|---|
TZ |
Time Zone | |
DEBUG |
Show debug information |
PARENT IMAGE
BUILT WITH
TIPS
- Only use rootless container runtime (podman, rootless docker)
- Allow non-root ports < 1024 via
echo "net.ipv4.ip_unprivileged_port_start=53" > /etc/sysctl.d/ports.conf
- Use a reverse proxy like Traefik, Nginx to terminate TLS with a valid certificate
- Use Let’s Encrypt certificates to protect your SSL endpoints
ElevenNotes™️
This image is provided to you at your own risk. Always make backups before updating an image to a new version. Check the changelog for breaking changes.
Languages
Dockerfile
100%