Commit f671016c by 周立明

构建加速

1 parent 2cf838ae
FROM python:3.11-slim FROM harbortest.glsx.com.cn/glsx/base_data_process:v1.1.0
#
ENV PYTHONDONTWRITEBYTECODE=1 \ #ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \ # PYTHONUNBUFFERED=1 \
PIP_NO_CACHE_DIR=1 \ # PIP_NO_CACHE_DIR=1 \
PIP_DISABLE_PIP_VERSION_CHECK=1 \ # PIP_DISABLE_PIP_VERSION_CHECK=1 \
TZ=Asia/Shanghai # TZ=Asia/Shanghai
#
WORKDIR /app #WORKDIR /app
#
RUN sed -i \ #RUN sed -i \
-e 's@deb.debian.org@mirrors.aliyun.com@g' \ # -e 's@deb.debian.org@mirrors.aliyun.com@g' \
-e 's@security.debian.org@mirrors.aliyun.com@g' \ # -e 's@security.debian.org@mirrors.aliyun.com@g' \
/etc/apt/sources.list.d/debian.sources \ # /etc/apt/sources.list.d/debian.sources \
&& apt-get update \ # && apt-get update \
&& apt-get install -y --no-install-recommends \ # && apt-get install -y --no-install-recommends \
gcc \ # gcc \
g++ \ # g++ \
libffi-dev \ # libffi-dev \
libssl-dev \ # libssl-dev \
tzdata \ # tzdata \
&& ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \ # && ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
&& echo "Asia/Shanghai" > /etc/timezone \ # && echo "Asia/Shanghai" > /etc/timezone \
&& rm -rf /var/lib/apt/lists/* # && rm -rf /var/lib/apt/lists/*
COPY requirements.txt . COPY requirements.txt .
RUN pip install -i https://mirrors.aliyun.com/pypi/simple/ --no-cache-dir --upgrade pip setuptools wheel \ RUN pip install -i https://mirrors.aliyun.com/pypi/simple/ --no-cache-dir --upgrade pip setuptools wheel \
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!