docker定製nginx

docker之Dockerfile實踐
http://www.javashuo.com/article/p-hpldenwl-hr.htmlhtml

Docker:使用Dockerfile構建Nginx鏡像
http://www.ywnds.com/?p=7611nginx

docker hub國內加速鏡像c++

#/etc/docker/deamon.json
{
 "registry-mirrors": [ "https://registry.docker-cn.com" ]
}

經常使用命令:docker

docker stop mynginx && docker rm mynginx

docker build --no-cache -t mynginx:3.1 .

docker run -d -p 80:80 --name=mynginx -v $PWD/logs:/var/log/nginx mynginx:3.1

docker exec -it mynginx /bin/bash

docker images |grep none |awk '{print $3}'|xargs docker rmi

#nginx-1.14.1
#nginx_http_upstream_check_modulejson

wget 'http://nginx.org/download/nginx-1.14.1.tar.gz'
cd nginx-1.14.1
patch -p1 < ../nginx_http_upstream_check_module/check_1.14.0+.patch

yum -y install gcc gcc-c++ autoconf automake make
yum -y install zlib zlib-devel openssl openssl--devel pcre pcre-devel
yum -y install openssl openssl-devel

./configure --prefix=/opt/nginx-1.14.1/ --add-module=../nginx_upstream_check_module-master/
make && make install
相關文章
相關標籤/搜索