We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4f0df03 commit d1f10a3Copy full SHA for d1f10a3
Dockerfile
@@ -1,11 +1,24 @@
1
FROM python:3.9.5-slim-buster
2
LABEL author="Lan"
3
-LABEL email="vast@tom.com"
+LABEL email="xzu@live.com"
4
5
+# 将当前目录下的文件复制到容器的 /app 目录
6
COPY . /app
-RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
7
-RUN echo 'Asia/Shanghai' >/etc/timezone
+
8
+# 设置时区为亚洲/上海
9
+RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' >/etc/timezone
10
11
+# 设置工作目录
12
WORKDIR /app
13
14
+# 删除不必要的目录,减少镜像体积
15
+RUN rm -rf docs fcb-fronted
16
17
+# 安装依赖
18
RUN pip install -r requirements.txt
19
20
+# 暴露端口
21
EXPOSE 12345
-CMD ["python","main.py"]
22
23
+# 启动应用
24
+CMD ["python", "main.py"]
0 commit comments