mirror of
https://github.com/ngfchl/ptools
synced 2023-07-10 13:41:22 +08:00
1. 重新初始化
This commit is contained in:
51
Dockerfile
Normal file
51
Dockerfile
Normal file
@@ -0,0 +1,51 @@
|
||||
# myproject/Dockerfile
|
||||
|
||||
# 建立 python3.9 环境
|
||||
FROM python:3.9.13
|
||||
|
||||
# 镜像作者大江狗
|
||||
MAINTAINER ngfchl ngfchl@126.com
|
||||
|
||||
# 设置 python 环境变量
|
||||
ENV PYTHONUNBUFFERED 1
|
||||
ENV DJANGO_SUPERUSER_USERNAME=admin
|
||||
ENV DJANGO_SUPERUSER_EMAIL=admin@eamil.com
|
||||
ENV DJANGO_SUPERUSER_PASSWORD=adminadmin
|
||||
|
||||
COPY pip.conf /root/.pip/pip.conf
|
||||
|
||||
# 创建 myproject 文件夹
|
||||
RUN mkdir -p /var/www/html/ptools
|
||||
|
||||
# 将 myproject 文件夹为工作目录
|
||||
WORKDIR /var/www/html/ptools
|
||||
|
||||
# 将当前目录加入到工作目录中(. 表示当前目录)
|
||||
ADD . /var/www/html/ptools
|
||||
|
||||
# 更新pip版本
|
||||
RUN /usr/local/bin/python -m pip install --upgrade pip
|
||||
|
||||
# 利用 pip 安装依赖
|
||||
#RUN pip install -r requirements.txt
|
||||
|
||||
# 去除windows系统编辑文件中多余的\r回车空格
|
||||
RUN sed -i 's/\r//' ./start.sh
|
||||
|
||||
# 给start.sh可执行权限
|
||||
RUN chmod +x ./start.sh
|
||||
RUN chmod +x ./update.sh
|
||||
|
||||
# 安装redis
|
||||
RUN sed -i 's/deb.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list
|
||||
|
||||
#RUN apt update
|
||||
#RUN yes|apt install libgl1-mesa-glx
|
||||
#RUN yes|apt install redis-server
|
||||
|
||||
VOLUME ["/var/www/html/ptools/db"]
|
||||
|
||||
EXPOSE 8000
|
||||
#ENTRYPOINT ["redis-server","/etc/redis/redis.conf"]
|
||||
#ENTRYPOINT ["/bin/bash", "first.sh"]
|
||||
ENTRYPOINT ["/bin/bash", "start.sh"]
|
||||
Reference in New Issue
Block a user