linux怎么查看本机内存大小
260
2022-10-18
Nginx的Docker容器化配置
这里只是做一个简单的演示,基础镜像选用 CentOS 7,Nginx 选用 Nginx 的扩展版本 OpenResty 1.15.8.2。
Nginx 镜像 Dockerfile 脚本如下:
FROM centos:centos7MAINTAINER Nginx Dockerfile Write by John.WangRUN yum -y install epel-release && yum -y install wget gcc make pcre-devel \ zlib-devel openssl-devel libxml2-devel libxslt-devel luajit GeoIP-devel \ gd-devel libatomic_ops-devel luajit-devel perl-devel perl-ExtUtils-EmbedRUN cd /tmp && wget && \ tar zxmf openresty-1.15.8.2.tar.gz && \ cd openresty-1.15.8.2 && \ ./configure \ --with-threads \ --with-file-aio \ --with-\ --with-\ --with-\ --with-\ --with-\ --with-\ --with-\ --with-\ --with-\ --with-\ --with-\ --with-\ --with-\ --with-\ --with-\ --with-\ --with-\ --with-\ --with-\ --with-stream=dynamic \ --with-stream_ssl_module \ --with-stream_realip_module \ --with-stream_geoip_module=dynamic \ --with-libatomic \ --with-pcre-jit \ --with-stream_ssl_preread_module && \ gmake && gmake installENV PATH $PATH:/usr/local/nginx/sbinRUN ln -s /usr/local/openresty/nginx /usr/local/nginxRUN ln -sf /dev/stdout /usr/local/nginx/logs/access.log &&\ ln -sf /dev/stderr /usr/local/nginx/logs/error.logEXPOSE 80ENTRYPOINT ["nginx", "-g", "daemon off;"]
在 Dockerfile 文件的同一目录下,执行如下命令构建 Nginx 的 Dokcer 镜像。
docker build -t nginx:v1.0 .
作者:小家电维修
转世燕还故榻,为你衔来二月的花。
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。
发表评论
暂时没有评论,来抢沙发吧~