diff --git a/Dockerfile b/Dockerfile index 2a0efad..b6dc1ff 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,8 @@ ENV PYTHONUNBUFFERED=1 WORKDIR /app # Install system dependencies -RUN apt-get update && apt-get install -y \ +RUN sed -i 's/deb.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list.d/debian.sources && \ + apt-get update && apt-get install -y \ gcc \ default-libmysqlclient-dev \ pkg-config \ @@ -17,7 +18,8 @@ RUN apt-get update && apt-get install -y \ # Install python dependencies COPY requirements.txt /app/ -RUN pip install --upgrade pip && pip install -r requirements.txt && pip install gunicorn +RUN pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/ && \ + pip install --upgrade pip && pip install -r requirements.txt && pip install gunicorn # Copy project COPY . /app/