mirror of
https://github.com/iflytek/skillhub.git
synced 2026-10-04 02:34:22 +00:00
feat : 提交镜像源地址
This commit is contained in:
parent
9d1869fe19
commit
b0040f323f
1 changed files with 10 additions and 4 deletions
|
|
@ -16,10 +16,16 @@ WORKDIR /app
|
|||
# 1.使用阿里云 Alpine 镜像源加速 apk 下载
|
||||
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
|
||||
|
||||
# 2. 只在包版本变化时重新安装(分层缓存)
|
||||
#RUN apk add --no-cache gcc musl-dev libffi-dev wget && \
|
||||
# pip install --no-cache-dir -i https://mirrors.aliyun.com/pypi/simple/ cisco-ai-skill-scanner && \
|
||||
# apk del gcc musl-dev libffi-dev
|
||||
# 2. 安装依赖包(使用清华 PyPI 镜像)
|
||||
RUN apk add --no-cache gcc musl-dev libffi-dev wget && \
|
||||
pip install --no-cache-dir -i https://pypi.tuna.tsinghua.edu.cn/simple cisco-ai-skill-scanner && \
|
||||
apk del gcc musl-dev libffi-dev
|
||||
|
||||
# 创建 app 用户和组
|
||||
RUN addgroup -S app && \
|
||||
adduser -S app -G app && \
|
||||
mkdir -p /tmp/skillhub-scans && \
|
||||
chown app:app /tmp/skillhub-scans
|
||||
|
||||
USER app
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue