1 Star 5 Fork 1

jwt1399 / Django-Blog

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
Dockerfile 1.06 KB
一键复制 编辑 原始数据 按行查看 历史
jwt1399 提交于 2020-04-30 15:00 . 优化细节,添加部署文件
FROM python:3.7
# 设置 python 环境变量
ENV PYTHONUNBUFFERED 1
# 添加 Debian 清华镜像源
RUN echo \
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster main contrib non-free\
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-updates main contrib non-free\
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-backports main contrib non-free\
deb https://mirrors.tuna.tsinghua.edu.cn/debian-security buster/updates main contrib non-free\
> /etc/apt/sources.list
# 添加这两行
RUN apt-get -y update
RUN apt-get upgrade
RUN apt install python3-dev default-libmysqlclient-dev -y #apt-get install libmysqlclient-dev
# 创建 code 文件夹并将其设置为工作目录
RUN mkdir /code
WORKDIR /code
# 添加 pip 清华镜像源
RUN pip install pip -U -i https://pypi.tuna.tsinghua.edu.cn/simple
# 将 requirements.txt 复制到容器的 code 目录
ADD requirements.txt /code/
# 添加 pip 清华镜像源
RUN pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
# 将当前目录复制到容器的 code 目录
ADD . /code/
Python
1
https://gitee.com/jwt1399/Django_Blog.git
git@gitee.com:jwt1399/Django_Blog.git
jwt1399
Django_Blog
Django-Blog
master

搜索帮助