docker ps 查看正在运行的1.20.2 nginx
docker cp ngx_healthcheck_module.tar.gz esl_nginx_1:/
docker exec -it esl_nginx_1
cd /usr/nginx-1.20.2/
patch -p1 </ngx_healthcheck_module/nginx_healthcheck_for_nginx_1.19+.patch #打补丁 Nginx 4层模块
./configure --prefix=/application/nginx --user=www --group=www --with-http_ssl_module --with-compat --with-file-aio --with-threads --with-http_addition_module --with-http_auth_request_module --with-http_dav_module --with-http_flv_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_mp4_module --with-http_random_index_module --with-http_realip_module --with-http_secure_link_module --with-http_slice_module --with-http_ssl_module --with-http_stub_status_module --with-http_sub_module --with-http_v2_module --with-mail --with-mail_ssl_module --with-stream --with-stream_realip_module --with-stream_ssl_module --with-stream_ssl_preread_module --add-module=/ngx_healthcheck_module
ln -s /application/nginx/sbin/nginx /usr/bin/nginx
任务执行完后commint 新的镜像
docker commit -a "com" -m "add module" d2deb6c02c36 esl/nginx:1.20.5
docker-compose 替换最新镜像Nginx 1.20.5,构建后查看是否有新增的模块
docker构建Nginx镜像
最新推荐文章于 2024-10-06 21:26:04 发布