mirror of https://github.com/jumpserver/jumpserver
				
				
				
			perf: using poetry mirror
							parent
							
								
									a0ee520572
								
							
						
					
					
						commit
						49b84b019d
					
				| 
						 | 
				
			
			@ -46,6 +46,7 @@ RUN set -ex \
 | 
			
		|||
WORKDIR /opt/jumpserver
 | 
			
		||||
 | 
			
		||||
ARG PIP_MIRROR=https://pypi.org/simple
 | 
			
		||||
ENV POETRY_PYPI_MIRROR_URL=${PIP_MIRROR}
 | 
			
		||||
ENV ANSIBLE_COLLECTIONS_PATHS=/opt/py3/lib/python3.11/site-packages/ansible_collections
 | 
			
		||||
 | 
			
		||||
RUN --mount=type=cache,target=/root/.cache \
 | 
			
		||||
| 
						 | 
				
			
			@ -55,10 +56,9 @@ RUN --mount=type=cache,target=/root/.cache \
 | 
			
		|||
    --mount=type=bind,source=requirements/collections.yml,target=collections.yml \
 | 
			
		||||
    set -ex \
 | 
			
		||||
    && python3 -m venv /opt/py3 \
 | 
			
		||||
    && pip install poetry -i ${PIP_MIRROR} \
 | 
			
		||||
    && pip install poetry poetry-plugin-pypi-mirror -i ${PIP_MIRROR} \
 | 
			
		||||
    && . /opt/py3/bin/activate \
 | 
			
		||||
    && poetry config virtualenvs.create false \
 | 
			
		||||
    && poetry config repositories.pypi ${PIP_MIRROR} \
 | 
			
		||||
    && poetry install --no-cache --only main \
 | 
			
		||||
    && ansible-galaxy collection install -r collections.yml --force --ignore-certs \
 | 
			
		||||
    && bash clean_site_packages.sh \
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -24,11 +24,11 @@ RUN set -ex \
 | 
			
		|||
WORKDIR /opt/jumpserver
 | 
			
		||||
 | 
			
		||||
ARG PIP_MIRROR=https://pypi.org/simple
 | 
			
		||||
ENV POETRY_PYPI_MIRROR_URL=${PIP_MIRROR}
 | 
			
		||||
COPY poetry.lock pyproject.toml ./
 | 
			
		||||
RUN set -ex \
 | 
			
		||||
    && . /opt/py3/bin/activate \
 | 
			
		||||
    && pip install poetry -i ${PIP_MIRROR} \
 | 
			
		||||
    && poetry config repositories.pypi ${PIP_MIRROR} \
 | 
			
		||||
    && pip install poetry poetry-plugin-pypi-mirror -i ${PIP_MIRROR} \
 | 
			
		||||
    && poetry install --only xpack \
 | 
			
		||||
    && poetry cache clear pypi --all
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue