File tree Expand file tree Collapse file tree 2 files changed +8
-10
lines changed
Expand file tree Collapse file tree 2 files changed +8
-10
lines changed Original file line number Diff line number Diff line change 11# 基于redis镜像构建
2- FROM redis:7-alpine
2+ FROM redis:7.2-bookworm
33# 工作目录
44WORKDIR /opt/linksumm
55# 把当前目录下的所有文件拷贝到工作目录
Original file line number Diff line number Diff line change 22
33# 安装依赖
44install_deps (){
5- akp update
6- apk add python3
7- apk add py3-pip
5+ apt-get update
6+ apt-get install -y python3 python3-pip python3-venv
87 mkdir -p /opt/linksumm && cd /opt/linksumm
98}
109
@@ -13,17 +12,16 @@ install_python_deps(){
1312 python3 -m venv venv
1413 source venv/bin/activate
1514 pip3 install -r requirements.txt
16- # 安装 Alpine 兼容的 Chromium
17- playwright install chromium-with-deps
15+ # 安装 Chromium
16+ playwright install chromium
1817}
1918
2019
2120# 清理缓存,缩小镜像体积
2221clean (){
23- apk del py3-pip
24- rm -rf /var/cache/apk/*
25- rm -rf /root/.cache
26- # rm -rf /opt/transmute/venv
22+ apt-get clean
23+ pip3 cache purge
24+ rm -rf /var/lib/apt/lists/*
2725}
2826
2927install_deps && install_python_deps && clean
You can’t perform that action at this time.
0 commit comments