Skip to content

Commit 282e604

Browse files
committed
perf(container): reuse base CA and timezone data
1 parent 6fc12a4 commit 282e604

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

Dockerfile

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,8 @@ ENV PYTHONDONTWRITEBYTECODE=1
4343
ENV PIP_NO_CACHE_DIR=1
4444
ENV TZ=Asia/Shanghai
4545

46-
# 安装运行时依赖(最小化)
47-
RUN apk add --no-cache \
48-
ca-certificates \
49-
tzdata \
50-
&& rm -rf /var/cache/apk/* \
51-
&& update-ca-certificates \
52-
&& cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
46+
# 固定的 Python Alpine 基础镜像已包含 CA 证书与时区数据,仅配置运行时区。
47+
RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
5348
&& echo "Asia/Shanghai" > /etc/timezone
5449

5550
WORKDIR /app

0 commit comments

Comments
 (0)