设为首页 收藏本站
查看: 1174|回复: 0

[经验分享] openresty加一堆扩展的dockerfile

[复制链接]
累计签到:2 天
连续签到:1 天
发表于 2016-8-10 10:05:26 | 显示全部楼层 |阅读模式
FROM centos:7

  #安装依赖
RUN buildDeps='make cmake automake intltool gcc gcc-c++ ruby git \
        readline-devel GeoIP-devel libcurl-devel libgcrypt-devel pam-devel libuuid-devel zlib-devel \
        boost-devel pcre-devel protobuf-compiler protobuf-devel openssl-devel gd-devel \
        yajl-devel libunwind-devel wget which file unzip' \
    && runDeps='GeoIP openssl gd yajl libunwind gperftools openldap-devel' \
    && yum install -y ${buildDeps} ${runDeps} \
    && cd /tmp \
  #安装drizzle-lib1.0
    && echo "Installing libdrizzle-1.0..." \
    && pushd . \
    && wget http://agentzh.org/misc/nginx/drizzle7-2011.07.21.tar.gz \
    && tar zxvf drizzle7-2011.07.21.tar.gz \
    && cd drizzle7-2011.07.21 \
    && ./configure --without-server \
    && make libdrizzle-1.0 \
    && make install-libdrizzle-1.0 \
    && ln -s /usr/local/lib/libdrizzle.so.1 /usr/lib/libdrizzle.so.1 \
    && ln -s /usr/local/lib/libdrizzle.so.1 /usr/lib64/libdrizzle.so.1 \
    && popd \
    && rm -rf drizzle7* \
  #安装 libfastcommon
    && echo "Installing libfastcommon..." \
    && pushd . \
    && wget -O libfastcommon-master.zip https://github.com/happyfish100/libfastcommon/archive/master.zip \
    && unzip libfastcommon-master.zip \
    && cd libfastcommon-master \
    && ./make.sh \
    && ./make.sh install \
    && popd \
    && rm -rf libfastcommon* \
  #安装FastDFS
    && echo "Installing FastDFS..." \
    && pushd . \
    && wget -O fastdfs-5.05.tar.gz  https://github.com/happyfish100/fastdfs/archive/V5.05.tar.gz \
    && tar -zxvf fastdfs-5.05.tar.gz \
    && cd fastdfs-5.05/ \
    && ./make.sh \
    && ./make.sh install \
    && mkdir -p /etc/fdfs/ && cp conf/http.conf conf/mime.types /etc/fdfs/ \
    && popd \
    && rm -rf fastdfs-5.05* \
  #下载 fastdfs-nginx-module
    && echo "Downloading fastdfs-nginx-module..." \
    && pushd . \
    && wget -O fastdfs-nginx-module-master.zip https://github.com/happyfish100/ ... /archive/master.zip \
    && unzip fastdfs-nginx-module-master.zip -d ./module/ \
    && mkdir -p /etc/fdfs/ && cp ./module/fastdfs-nginx-module-master/src/mod_fastdfs.conf /etc/fdfs/ \
    && sed -i 's/load_fdfs_parameters_from_tracker=true/load_fdfs_parameters_from_tracker=false/g' /etc/fdfs/mod_fastdfs.conf \
    && popd \
  #下载所需 nginx 模块
    && echo "Downloading *-nginx-module..." \
    && pushd . \
    && mkdir -p module \
    && cd module \
    && git clone https://github.com/happyfish100/fastdfs-nginx-module.git \
    #&& git clone https://github.com/cep21/healthcheck_nginx_upstreams.git \
    && git clone https://github.com/arut/nginx-rtmp-module.git \
    && git clone https://github.com/alibaba/nginx-http-concat.git \
    && git clone https://github.com/vkholodkov/nginx-mogilefs-module.git \
    && git clone https://github.com/FRiCKLE/ngx_cache_purge.git \
    && git clone https://github.com/simpl/ngx_mongo.git \
    && popd \
  #安装openresty
    && RESTY_VERSION="1.9.7.4" \
    && echo "Installing openresty-${RESTY_VERSION}..." \
    && pushd . \
    && curl -fSL https://openresty.org/download/openresty-${RESTY_VERSION}.tar.gz -o openresty-${RESTY_VERSION}.tar.gz \
    && tar xzf openresty-${RESTY_VERSION}.tar.gz \
    && cd openresty-${RESTY_VERSION} \
    && ./configure --user=nobody --group=nobody \
        --prefix=/usr/local/openresty \
        --conf-path=/etc/openresty/nginx/nginx.conf \
        --pid-path=/var/run/nginx.pid \
        --error-log-path=/var/log/nginx/error.log \
        --with-luajit \
        --with-http_flv_module \
        --with-http_gzip_static_module \
        --with-http_mp4_module \
        --with-http_image_filter_module \
        --with-http_stub_status_module \
        --with-http_ssl_module \
        --with-http_realip_module \
        --with-debug \
        --with-http_geoip_module \
        --with-http_drizzle_module \
        --with-http_iconv_module \
        --add-module=../module/nginx-http-concat \
        --add-module=../module/nginx-mogilefs-module \
        --add-module=../module/nginx-rtmp-module \
        --add-module=../module/ngx_cache_purge \
        --add-module=../module/ngx_mongo \
        --add-module=../module/fastdfs-nginx-module/src\
    && gmake \
    && gmake install \
    && popd \
    && rm -rf openresty-* \
  #打扫环境
    && echo "Cleaning ..." \
    && rm -rf module \
    && ls -al /tmp \
    && yum remove -y ${buildDeps} \
    && yum autoremove -y \
    && yum clean all \
    && ln -s /usr/local/openresty/nginx/sbin/nginx /usr/local/bin/ \
    && rm -vf /etc/openresty/nginx.conf \
    && rm -vf /etc/openresty/nginx/conf.d

WORKDIR /usr/local/openresty
ADD nginx.conf /etc/openresty/nginx/
ADD conf.d /etc/openresty/nginx/conf.d
ADD ./html /usr/share/nginx/html
EXPOSE 80
#ENV PATH /usr/local/nginx/bin:$PATH
VOLUME [ "/usr/local/openresty/html"]
CMD nginx



运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-255809-1-1.html 上篇帖子: lnmp的docker-compose.yml 下篇帖子: php-fpm dockerfile
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表