This commit is contained in:
parent
1e920b29d0
commit
367f5d57d1
22
Dockerfile
Normal file
22
Dockerfile
Normal file
@ -0,0 +1,22 @@
|
||||
# 使用官方 Python 运行时作为父镜像
|
||||
FROM python:3.10-slim
|
||||
|
||||
# 设置工作目录
|
||||
WORKDIR /app
|
||||
|
||||
# 复制当前目录内容到容器中的 /app 目录
|
||||
COPY . /app
|
||||
|
||||
# 安装依赖
|
||||
#RUN apt-get update && apt-get install -y git
|
||||
RUN pip install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple/
|
||||
|
||||
|
||||
|
||||
# 使端口 8012 可供此容器外的环境使用
|
||||
EXPOSE 8012
|
||||
# 将 start-prod.sh 设置为可执行
|
||||
RUN chmod +x /app/scripts/start-prod.sh
|
||||
|
||||
# 运行应用
|
||||
CMD ["/app/scripts/start-prod.sh"]
|
Loading…
Reference in New Issue
Block a user