1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| RUN --mount=type=cache,target=/var/cache/apt,sharing=locked,id=test-apt-cache \ --mount=type=cache,target=/var/lib/apt,sharing=locked,id=test-apt-lib \ sed -i s@/deb.debian.org/@/mirrors.aliyun.com/@g /etc/apt/sources.list && \ sed -i s@/security.debian.org/@/mirrors.aliyun.com/@g /etc/apt/sources.list && \ apt-get update && \ apt-get -y --no-install-recommends install \ wget ca-certificates curl procps
RUN --mount=type=cache,target=/root/.cache,id=test-poetry-cache \ pip config set global.index-url https://mirrors.aliyun.com/pypi/simple && \ pip install poetry
RUN --mount=type=cache,target=/root/.cache,id=test-poetry-cache \ --mount=type=bind,source=./app/poetry.lock,target=poetry.lock \ --mount=type=bind,source=./app/pyproject.toml,target=pyproject.toml \ poetry install --no-root --only main
|