zoukankan      html  css  js  c++  java
  • docker-compose文件

    docker-compose 

    version: "3"
    services:
      user-dashboard:
        build: .
        volumes:
          - .:/data/code/
          - /proc:/writable-proc
        ports:
          - "8891:8891"
        networks:
          - walkoff_network
        restart: always
        container_name: new_user-dashboard
    
    networks:
        walkoff_network:
          external: true
    

    Dockerfile

    FROM python:3.6
    # Add
    ADD deploy/sources.list /etc/apt/sources.list
    ADD deploy/secrets  /home/
    # Packages
    #RUN apt-get update
    # Language
    #RUN apt-get install -y locales
    #RUN locale-gen en_US.UTF-8
    ENV LC_ALL=en_US.UTF-8
    ENV LANG=en_US.UTF-8
    ENV LANGUAGE=en_US.UTF-8
    # 设置时区
    #RUN apt-get install -y tzdata
    RUN rm -f /etc/localtime
    RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
    ENV TZ=:/etc/localtime
    ENV LC_ALL=C.UTF-8
    ENV LANG=C.UTF-8
    ENV LANGUAGE=C.UTF-8
    # timezone.
    ENV TZ=GMT-8
    
    # PIP Mirror
    RUN mkdir -p /root/.pip/
    ADD deploy/pip.conf /root/.pip/
    
    # project dir
    RUN rm -rf /data && mkdir -p /data/
    WORKDIR /data/code/
    
    
    ADD requirements.txt /data/
    RUN pip install --no-cache-dir -r /data/requirements.txt
    
    
    RUN rm -rf /data/code/ && mkdir -p /data/code/
    #env
    ENV FLASK_APP wsgi.py
    EXPOSE 8891
    ENTRYPOINT ["/data/code/deploy/run.sh"]
    

      

      

  • 相关阅读:
    jenkins 添加用户管理权限
    jenkins+svn 自动化上线
    harbor私有仓库安装
    zabbix 监控 tcp 连接数
    zabbix 监控https URL
    chattr +i 用户也没法随意删除
    MySQL 8.0权限认证(下)
    MySQL 8.0权限认证(上)
    MySQL 8.0二进制包安装
    RPM命令总结
  • 原文地址:https://www.cnblogs.com/weidaijie/p/13051659.html
Copyright © 2011-2022 走看看