Commit 9e5b3585 by zhouhaibao

build(data-process): 配置阿里云镜像源加速Docker构建

- 在apt源配置中替换为阿里云镜像地址
- 为pip安装配置阿里云PyPI镜像源
- 优化包管理器依赖安装流程
- 移除Dockerfile末尾多余空行
1 parent ff248823
......@@ -8,19 +8,24 @@ ENV PYTHONDONTWRITEBYTECODE=1 \
WORKDIR /app
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc \
g++ \
libffi-dev \
libssl-dev \
tzdata \
RUN sed -i \
-e 's@deb.debian.org@mirrors.aliyun.com@g' \
-e 's@security.debian.org@mirrors.aliyun.com@g' \
/etc/apt/sources.list.d/debian.sources \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
gcc \
g++ \
libffi-dev \
libssl-dev \
tzdata \
&& ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
&& echo "Asia/Shanghai" > /etc/timezone \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt .
RUN pip install --no-cache-dir --upgrade pip setuptools wheel \
&& pip install --no-cache-dir -r requirements.txt
RUN pip install -i https://mirrors.aliyun.com/pypi/simple/ --no-cache-dir --upgrade pip setuptools wheel \
&& pip install -i https://mirrors.aliyun.com/pypi/simple/ --no-cache-dir -r requirements.txt
COPY . .
......@@ -29,5 +34,4 @@ ENV FLASK_HOST=0.0.0.0 \
EXPOSE 5000
CMD ["python", "app.py"]
CMD ["python", "app.py"]
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!