Skip to content

Commit d1f10a3

Browse files
committed
feat: docs
1 parent 4f0df03 commit d1f10a3

File tree

2 files changed

+211
-197
lines changed

2 files changed

+211
-197
lines changed

Dockerfile

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,24 @@
11
FROM python:3.9.5-slim-buster
22
LABEL author="Lan"
3-
LABEL email="vast@tom.com"
3+
LABEL email="xzu@live.com"
44

5+
# 将当前目录下的文件复制到容器的 /app 目录
56
COPY . /app
6-
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
7-
RUN echo 'Asia/Shanghai' >/etc/timezone
7+
8+
# 设置时区为亚洲/上海
9+
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' >/etc/timezone
10+
11+
# 设置工作目录
812
WORKDIR /app
13+
14+
# 删除不必要的目录,减少镜像体积
15+
RUN rm -rf docs fcb-fronted
16+
17+
# 安装依赖
918
RUN pip install -r requirements.txt
19+
20+
# 暴露端口
1021
EXPOSE 12345
11-
CMD ["python","main.py"]
22+
23+
# 启动应用
24+
CMD ["python", "main.py"]

0 commit comments

Comments
 (0)