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"]
相关推荐
链块学院 2020-11-06
afanti 2020-09-14
白开水 2020-07-19
liyansring 2020-07-18
shenzhenzsw 2020-07-18
啦啦啦啦啦 2020-06-28
yangliuhbhd 2020-06-12
小爷有点狂 2020-06-12
无风的雨 2020-06-12
changecan 2020-06-11
蒜蓉粉丝蒸扇贝 2020-06-10
lihongtai 2020-06-08
liaochaowu 2020-06-06
scmrpu 2020-06-02
kuzilala 2020-05-14
小信 2020-05-14