zoukankan      html  css  js  c++  java
  • Docker::环境变量配置容器

    FROM opensuse:latest
    COPY ./cms /cms
    COPY ./mylib /usr/local/lib
    
    RUN chmod 777 /cms/cms
    RUN chmod 777 /cms/AutoStart.sh
    RUN /sbin/ldconfig
    
    EXPOSE 8080
    EXPOSE 8081
    EXPOSE 8082
    
    ENV DBIP             127.0.0.1
    ENV DBPORT           3306
    ENV DBNAME           viewfocus_bonson
    ENV DBUSER           root
    ENV DBPSW            command
    
    ENV REDISIP         127.0.0.1
    ENV REDISPORT       6379
    ENV REDISDB         1
    ENV REDISPSW        command
    ENV REDISSUB        web_broadcast_ch
    ENV REDISPUB        sc_broadcast_ch
    
    ENV SOAPPORT        8080
    ENV UDPSENDPORT     8081
    ENV UDPRECVPORT     8082
    
    CMD ["sh","/cms/AutoStart.sh" ]

    环境变量存储在:/proc/1/environ 中。

    格式化查看环境变量:cat /proc/1/environ |tr '' ' '

  • 相关阅读:
    pinyin4j使用示例
    迭代器模式
    适配器模式
    策略模式
    装饰模式
    责任链模式
    命令模式
    中介者模式
    原型模式
    代理模式
  • 原文地址:https://www.cnblogs.com/osbreak/p/9704259.html
Copyright © 2011-2022 走看看