zoukankan      html  css  js  c++  java
  • 使用docker搭建OpenResty开发环境

    Dockerfile文件:

    FROM centos:latest
    
    RUN yum install -y pcre-devel openssl-devel gcc curl wget perl make 
        cd ~ 
        wget https://openresty.org/download/openresty-1.15.8.1.tar.gz 
        tar -xzvf openresty-1.15.8.1.tar.gz 
        cd openresty-1.15.8.1 
        ./configure 
        gmake 
        gmake install
    RUN PATH=$PATH:/usr/local/openresty/nginx/sbin:/usr/local/openresty/bin/
    RUN mkdir -p /lua
    RUN mkdir -p /usr/local/openresty/nginx/conf/conf.d
    RUN nginx &
    
    EXPOSE 80 443
    

    docker-compose.yml文件:

    version: '3.3'
    
    services:
    
       openresty:
          build: ./dockerfile/openresty
          image: phonecom/openresty
          restart: always
          privileged: true
          ports:
            - "8888:80"
            - "4430:443"
          volumes:
            - "./etc/openresty/nginx.conf:/usr/local/openresty/nginx/conf/nginx.conf"
            - "./etc/openresty/conf.d:/usr/local/openresty/nginx/conf/conf.d"
            - "./project/lua:/lua"
          command: 
            - /bin/sh
            - -c 
            - |
              while true;do sleep 100;done
    
    
  • 相关阅读:
    软硬链接
    查看文件内容
    cp+mv
    cd+rm+pwd
    ls+tree
    绝对路径和相对路径
    Linux目录结构
    修改hostname
    java. util. concurrent. atomic
    git
  • 原文地址:https://www.cnblogs.com/phonecom/p/10995611.html
Copyright © 2011-2022 走看看