use fast souces
This commit is contained in:
@@ -1,10 +1,27 @@
|
||||
FROM python:3.12-slim
|
||||
ARG PYTHON_IMAGE=docker.m.daocloud.io/library/python:3.12-slim
|
||||
FROM ${PYTHON_IMAGE}
|
||||
|
||||
ARG APT_MIRROR=mirrors.aliyun.com
|
||||
ARG PIP_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simple
|
||||
ARG PIP_TRUSTED_HOST=pypi.tuna.tsinghua.edu.cn
|
||||
|
||||
ENV PYTHONDONTWRITEBYTECODE=1 \
|
||||
PYTHONUNBUFFERED=1 \
|
||||
PIP_NO_CACHE_DIR=1
|
||||
PIP_NO_CACHE_DIR=1 \
|
||||
PIP_DISABLE_PIP_VERSION_CHECK=1 \
|
||||
PIP_INDEX_URL=${PIP_INDEX_URL} \
|
||||
PIP_TRUSTED_HOST=${PIP_TRUSTED_HOST}
|
||||
|
||||
RUN apt-get update \
|
||||
RUN set -eux; \
|
||||
if [ -f /etc/apt/sources.list.d/debian.sources ]; then \
|
||||
sed -i "s|deb.debian.org|${APT_MIRROR}|g; s|security.debian.org|${APT_MIRROR}|g" \
|
||||
/etc/apt/sources.list.d/debian.sources; \
|
||||
fi; \
|
||||
if [ -f /etc/apt/sources.list ]; then \
|
||||
sed -i "s|deb.debian.org|${APT_MIRROR}|g; s|security.debian.org|${APT_MIRROR}|g" \
|
||||
/etc/apt/sources.list; \
|
||||
fi; \
|
||||
apt-get update \
|
||||
&& apt-get install -y --no-install-recommends ffmpeg ca-certificates \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
|
||||
Reference in New Issue
Block a user