|
|
@ -43,14 +43,18 @@ RUN set -ex \ |
|
|
|
WORKDIR /opt/jumpserver |
|
|
|
WORKDIR /opt/jumpserver |
|
|
|
|
|
|
|
|
|
|
|
ARG PIP_MIRROR=https://pypi.org/simple |
|
|
|
ARG PIP_MIRROR=https://pypi.org/simple |
|
|
|
|
|
|
|
ENV ANSIBLE_COLLECTIONS_PATHS=/opt/py3/lib/python3.11/site-packages/ansible_collections |
|
|
|
|
|
|
|
|
|
|
|
RUN --mount=type=cache,target=/root/.cache,sharing=locked,id=core \ |
|
|
|
RUN --mount=type=cache,target=/root/.cache,sharing=locked,id=core \ |
|
|
|
--mount=type=bind,source=poetry.lock,target=poetry.lock \ |
|
|
|
--mount=type=bind,source=poetry.lock,target=poetry.lock \ |
|
|
|
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \ |
|
|
|
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \ |
|
|
|
--mount=type=bind,source=utils/clean_site_packages.sh,target=clean_site_packages.sh \ |
|
|
|
--mount=type=bind,source=utils/clean_site_packages.sh,target=clean_site_packages.sh \ |
|
|
|
|
|
|
|
--mount=type=bind,source=requirements/collections.yml,target=collections.yml \ |
|
|
|
set -ex \ |
|
|
|
set -ex \ |
|
|
|
&& python3 -m venv /opt/py3 \ |
|
|
|
&& python3 -m venv /opt/py3 \ |
|
|
|
&& pip install poetry -i ${PIP_MIRROR} \ |
|
|
|
&& pip install poetry -i ${PIP_MIRROR} \ |
|
|
|
&& poetry config virtualenvs.create false \ |
|
|
|
&& poetry config virtualenvs.create false \ |
|
|
|
&& . /opt/py3/bin/activate \ |
|
|
|
&& . /opt/py3/bin/activate \ |
|
|
|
&& poetry install --only main \ |
|
|
|
&& poetry install --only main \ |
|
|
|
|
|
|
|
&& ansible-galaxy collection install -r collections.yml --force --ignore-certs \ |
|
|
|
&& bash clean_site_packages.sh |
|
|
|
&& bash clean_site_packages.sh |
|
|
|