|
|
@@ -1,22 +1,19 @@
|
|
|
FROM python:3.10-alpine
|
|
|
|
|
|
WORKDIR /root/workspace/
|
|
|
-COPY ./pyproject.toml ./
|
|
|
+COPY pyproject.toml poetry.lock ./
|
|
|
|
|
|
RUN MAIN_VERSION=$(cat /etc/alpine-release | cut -d '.' -f 0-2) \
|
|
|
&& mv /etc/apk/repositories /etc/apk/repositories-bak \
|
|
|
&& { echo "https://mirrors.aliyun.com/alpine/v${MAIN_VERSION}/main"; \
|
|
|
echo "https://mirrors.aliyun.com/alpine/v${MAIN_VERSION}/community"; } >> /etc/apk/repositories \
|
|
|
- && apk add --update --no-cache tzdata gcc build-base libffi-dev curl && cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
|
|
|
+ && apk add --update --no-cache tzdata gcc build-base libffi-dev && cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
|
|
|
&& mkdir ~/.pip \
|
|
|
&& printf '[global]\nindex-url=https://mirrors.aliyun.com/pypi/simple/' > ~/.pip/pip.conf \
|
|
|
&& python3 -m pip install --upgrade pip \
|
|
|
- && curl -o poetry-install.py -SL https://install.python-poetry.org \
|
|
|
- && python3 -u poetry-install.py \
|
|
|
- && rm poetry-install.py \
|
|
|
- && export PATH="/root/.local/bin:$PATH" \
|
|
|
+ && python3 -m pip install poetry==1.8.4 \
|
|
|
&& poetry config virtualenvs.create false --local \
|
|
|
- && poetry install
|
|
|
+ && poetry install --only main --no-root --no-interaction --no-ansi
|
|
|
|
|
|
COPY . .
|
|
|
|