David 4 months ago
parent
commit
c160ed1889
1 changed files with 8 additions and 0 deletions
  1. 8 0
      Dockerfile

+ 8 - 0
Dockerfile

@@ -1,3 +1,11 @@
+
+FROM ubuntu:latest
+
+# 安装 tzdata 包并设置时区
+RUN apt-get update && apt-get install -y tzdata
+ENV TZ=Asia/Shanghai
+RUN ln -fsn /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
+
 # 使用官方 Python 镜像作为基础镜像
 FROM 192.168.1.36:5000/python:3.7.16
 ENV LANG=en_US.UTF-8