zoukankan      html  css  js  c++  java
  • centos 7.9 dockerfile

    [root@kod ]# ll  /opt/dockerfile/kod/
    total 13584
    -rw-r--r-- 1 root root      471 Jun  9 21:58 dockerfile
    -rw-r--r-- 1 root root       45 Jun  9 21:14 init.sh
    -rw-r--r-- 1 root root 13894810 Mar 19  2020 kodexplorer4.40.zip
    -rw-r--r-- 1 root root      649 Jun  9 20:53 nginx.conf

    cat dockerfile

    FROM centos:7
    RUN yum install epel-release -y && yum clean all && yum makecache && yum install nginx php-fpm php-cli lrzsz unzip  php-mbstring php-gd -y
    RUN sed -i 's#apache#nginx#g' /etc/php-fpm.d/www.conf
    ADD nginx.conf /etc/nginx/nginx.conf
    RUN cd /usr/share/nginx/html && rm -fr ./*
    ADD kodexplorer4.40.zip /usr/share/nginx/html/
    RUN cd /usr/share/nginx/html && unzip kodexplorer4.40.zip && chown -R nginx.nginx ./*
    ADD init.sh /init.sh
    CMD ["/bin/bash", "/init.sh"]

    cat nginx.conf

    worker_processes  1;
    events {
        worker_connections  1024;
    }
    http {
        include       mime.types;
        default_type  application/octet-stream;
        sendfile        on;
        keepalive_timeout  65;
        server {
            listen       80;
            server_name  localhost;

        index  index.html index.htm index.php;
            location ~ .php$ {
            root   html;
            fastcgi_pass 127.0.0.1:9000;
            fastcgi_index index.php;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            include fastcgi_params;

        }
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
         }
         }
    }

    cat init.sh

    #!/bin/bash
    php-fpm &
    nginx -g 'daemon off;'

  • 相关阅读:
    ios awakeFromNib 和 initWithCoder:
    iOS 关于iphone6 和 iphone6 plus 的适配
    iOS 目录的使用
    iOS 8 WKWebView 知识点
    iOS 动画结束后 view的位置 待完善
    iOS coredata 数据库升级 时报Can't find model for source store
    iOS 真机文件系统区分大小写,而模拟器可能不区分
    iOS coredata 级联删除
    iOS 关于AFNetworking ssl 待完成
    iOS 关于UIWindow的理解
  • 原文地址:https://www.cnblogs.com/slyy/p/14869033.html
Copyright © 2011-2022 走看看