This repository is no longer maintained. The latest built images can be found in the Docker Release.
此仓库已不在维护,最新构建的镜像请查看 Docker Release 。
A nginx docker image with some useful modules.
Download size of this image is:
Docker hub image: funnyzak/nginx
Docker Pull Command: docker pull funnyzak/nginx:latest
China Mirror: docker pull registry.cn-beijing.aliyuncs.com/funnyzak/nginx:latest
- ngx_http_geoip_module.so
- ngx_http_image_filter_module.so
- ngx_http_perl_module.so
- ngx_http_xslt_filter_module.so
- ngx_mail_module.so
- ngx_stream_geoip_module.so
- ngx_stream_module.so
- ngx-fancyindex
- headers-more-nginx-module
- ...
More modules can be found in Dockerfile.
First, create a nginx.conf
file in your project directory, and then run the following command:
docker run -d -t -i --name nginx --restar on-failure \
-v /path/to/nginx.conf:/etc/nginx/nginx.conf \
-v /path/to/conf.d:/etc/nginx/conf.d \
-p 1688:80 \
funnyzak/nginx
First, create a docker-compose.yml
file in your project directory:
version: “3.3”
services:
nginx:
image: funnyzak/nginx
container_name: nginx
environment:
- TZ=Asia/Shanghai
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
- ./nginx/conf.d:/etc/nginx/conf.d
restart: on-failure
ports:
- “1688:80”
Now, running docker-compose up -d
will run the application for you.
docker build \
--build-arg VCS_REF=`git rev-parse --short HEAD` \
--build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
--build-arg VERSION="1.23.3"
-t funnyzak/nginx:1.23.3 .
load_module /usr/lib64/nginx/modules/ngx_http_image_filter_module.so;
load_module /usr/lib64/nginx/modules/ngx_stream_module.so;
load_module /usr/lib64/nginx/modules/ngx_http_geoip_module.so;
load_module /usr/lib64/nginx/modules/ngx_http_xslt_filter_module.so;
load_module /usr/lib64/nginx/modules/ngx_stream_geoip_module.so;
# load_module /usr/lib64/nginx/modules/ngx_http_perl_module.so;
# load_module /usr/lib64/nginx/modules/ngx_mail_module.so;
user nginx;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
#log_format main ‘$remote_addr - $remote_user [$time_local] “$request” ‘
# ‘$status $body_bytes_sent “$http_referer” ‘
# ‘”$http_user_agent” “$http_x_forwarded_for”’;
#access_log logs/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
#gzip on;
include /etc/nginx/conf.d/*.conf;
}
If you have any questions or suggestions, please feel free to submit an issue or pull request.
MIT License © 2022 funnyzak