mirror of https://github.com/jumpserver/jumpserver
perf: ee dockerfile
parent
bd3909ad27
commit
0d338f80c5
|
@ -1,4 +1,4 @@
|
||||||
FROM jumpserver/core-base:20240724_070705 AS stage-build
|
FROM jumpserver/core-base:20240801_101727 AS stage-build
|
||||||
|
|
||||||
ARG VERSION
|
ARG VERSION
|
||||||
|
|
||||||
|
|
|
@ -16,9 +16,7 @@ ARG TOOLS=" \
|
||||||
wget"
|
wget"
|
||||||
|
|
||||||
ARG APT_MIRROR=http://deb.debian.org
|
ARG APT_MIRROR=http://deb.debian.org
|
||||||
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked,id=core \
|
RUN set -ex \
|
||||||
--mount=type=cache,target=/var/lib/apt,sharing=locked,id=core \
|
|
||||||
set -ex \
|
|
||||||
&& rm -f /etc/apt/apt.conf.d/docker-clean \
|
&& rm -f /etc/apt/apt.conf.d/docker-clean \
|
||||||
&& echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache \
|
&& echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache \
|
||||||
&& sed -i "s@http://.*.debian.org@${APT_MIRROR}@g" /etc/apt/sources.list \
|
&& sed -i "s@http://.*.debian.org@${APT_MIRROR}@g" /etc/apt/sources.list \
|
||||||
|
@ -26,13 +24,12 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked,id=core \
|
||||||
&& apt-get -y install --no-install-recommends ${TOOLS} \
|
&& apt-get -y install --no-install-recommends ${TOOLS} \
|
||||||
&& echo "no" | dpkg-reconfigure dash
|
&& echo "no" | dpkg-reconfigure dash
|
||||||
|
|
||||||
|
WORKDIR /opt/jumpserver
|
||||||
|
|
||||||
ARG PIP_MIRROR=https://pypi.org/simple
|
ARG PIP_MIRROR=https://pypi.org/simple
|
||||||
RUN --mount=type=bind,source=poetry.lock,target=/opt/jumpserver/poetry.lock \
|
COPY poetry.lock pyproject.toml ./
|
||||||
--mount=type=bind,source=pyproject.toml,target=/opt/jumpserver/pyproject.toml \
|
RUN set -ex \
|
||||||
set -ex \
|
&& . /opt/py3/bin/activate \
|
||||||
. /opt/py3/bin/activate \
|
|
||||||
&& pip install poetry -i ${PIP_MIRROR} \
|
&& pip install poetry -i ${PIP_MIRROR} \
|
||||||
&& poetry config repositories.mirror ${PIP_MIRROR} \
|
|
||||||
&& poetry install --only xpack
|
&& poetry install --only xpack
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue