docker之Dockerfile实践
https://www.cnblogs.com/jsonhc/p/7767669.html
Docker:使用Dockerfile构建Nginx镜像
http://www.ywnds.com/?p=7611
docker hub国内加速镜像
#/etc/docker/deamon.json
{
"registry-mirrors": [ "https://registry.docker-cn.com" ]
}
常用命令:
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_module
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
转载于:https://blog.51cto.com/f1yinsky/2165144