Merge pull request #190 from Rambin/patch-pypialiyun

use Aliyun for PyPI source when not in Github Actions
This commit is contained in:
vvbbnn00 2024-05-07 14:27:54 +08:00 committed by GitHub
commit c7bf236007
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3,10 +3,11 @@ FROM python:3.11-alpine
WORKDIR /app
# Install dependencies for building some Python packages
# Check if in Github Actions, if not, change Alpine source to Aliyun
# Check if in Github Actions, if not, change Alpine source and PyPI source to Aliyun
ARG GITHUB_ACTIONS
RUN if [ "$GITHUB_ACTIONS" != "true" ]; then \
sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories; \
pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/; \
fi
RUN apk add --no-cache bash build-base libffi-dev openssl-dev gcompat