akhomy / alpine-nginx

Docker NGINX image based on Alpine Linux.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Status

Archived in favor of other tools.

NGINX image for Docker Compose LAMP stack

NGINX image based on Alpine Linux.

Include own configs

You could mount to /temp_configs_dir with your volume and use your own configs. Variable USE_ONLY_CONFIGS - disable using the custom variables in the list below.

How to run

Run the image on port 80, be aware first you need to start proxy(in docker-compose-lamp APACHE2-MPM container).

docker run -v /hostDir:/var/www/localhost/htdocs -d -p 8003:80 -e LISTEN_PORT="80" -e PROXY_PASS="http://apache2_mpm:8080" --name nginx --link apache2_mpm akhomy/alpine-nginx

Environment Variables

Variable Default Value Description
KEEPALIVE_TIMEOUT keepalive_timeout 3000 Line keepalive_timeout in the /etc/nginx/nginx.conf
FASTCGI_READ_TIMEOUT fastcgi_read_timeout 300 Line fastcgi_read_timeout in the /etc/nginx/nginx.conf
LISTEN_PORT listen 80 Line listen in the /etc/nginx/nginx.conf
LISTEN_SSL_PORT listen 443 ssl Line listen in the /etc/nginx/nginx.conf
OPENSSL_ARGS req -x509 -nodes -subj '/CN=localhost/O=My Company Name LTD./C=US' -days 2048 -newkey rsa:2048 Generates SSL keys /etc/nginx/ssl/nginx-selfsigned.key, /etc/nginx/ssl/nginx-selfsigned.crt with custom arguments. E.g. openssl req -x509 -nodes -subj '/CN=localhost/O=My Company Name LTD./C=US' -days 2048 -newkey rsa:2048 -keyout /etc/nginx/ssl/nginx-selfsigned.key -out /etc/nginx/ssl/nginx-selfsigned.crt
SERVER_ROOT root /var/www/localhost/htdocs Line root in the /etc/nginx/nginx.conf
SERVER_NAME server_name localhost Line server_name in the /etc/nginx/nginx.conf
CLIENT_MAX_BODY_SIZE client_max_body_size 32m Line client_max_body_size in the /etc/nginx/nginx.conf
PROXY_CONNECT_TIMEOUT proxy_connect_timeout 600 Line proxy_connect_timeout in the /etc/nginx/nginx.conf
PROXY_SEND_TIMEOUT proxy_send_timeout 600 Line proxy_send_timeout in the /etc/nginx/nginx.conf
PROXY_READ_TIMEOUT proxy_read_timeout 600 Line proxy_read_timeout in the /etc/nginx/nginx.conf
SEND_TIMEOUT send_timeout 600 Line send_timeout in the /etc/nginx/nginx.conf
FASTCGI_BUFFERS fastcgi_buffers 16 16k Line fastcgi_buffers in the /etc/nginx/nginx.conf
FASTCGI_BUFFER_SIZE fastcgi_buffer_size 32k Line fastcgi_buffer_size in the /etc/nginx/nginx.conf
PROXY_BUFFER_SIZE proxy_buffer_size 128k Line proxy_buffer_size in the /etc/nginx/nginx.conf
PROXY_BUFFERS proxy_buffers 4 256k Line proxy_buffers in the /etc/nginx/nginx.conf
PROXY_BUSY_BUFFER_SIZE proxy_busy_buffers_size 256k Line proxy_busy_buffers_size in the /etc/nginx/nginx.conf
PROXY_PASS proxy_pass http://apache2_mpm:8080 Lines proxy_pass in the /etc/nginx/nginx.conf

Full LAMP stack

See Docker Compose LAMP.

About

Docker NGINX image based on Alpine Linux.


Languages

Language:Shell 75.3%Language:Dockerfile 24.7%