jumpserver/Dockerfile-ee

38 lines
1.2 KiB
Plaintext
Raw Normal View History

ARG VERSION
ARG BASE_IMAGE=registry.fit2cloud.com/jumpserver/core
2023-08-03 06:33:22 +00:00
FROM registry.fit2cloud.com/jumpserver/xpack:${VERSION} as build-xpack
FROM registry.fit2cloud.com/jumpserver/core:${VERSION}-base as build-core
2024-04-02 16:11:41 +00:00
ARG TARGETARCH
WORKDIR /opt/jumpserver
2024-05-06 02:38:02 +00:00
RUN --mount=type=cache,target=/root/.cache,sharing=locked \
2024-04-02 16:11:41 +00:00
--mount=type=bind,source=poetry.lock,target=/opt/jumpserver/poetry.lock \
--mount=type=bind,source=pyproject.toml,target=/opt/jumpserver/pyproject.toml \
set -ex \
2024-05-13 10:21:51 +00:00
&& . /opt/py3/bin/activate \
&& poetry install --only xpack
2024-05-13 10:21:51 +00:00
FROM ${BASE_IMAGE}:${VERSION}-lite
2024-04-02 16:11:41 +00:00
ARG TARGETARCH
ARG TOOLS=" \
curl \
iputils-ping \
2024-04-30 03:07:38 +00:00
netcat-openbsd \
2024-04-02 16:11:41 +00:00
nmap \
telnet \
vim \
wget"
ARG APT_MIRROR=http://mirrors.ustc.edu.cn
2024-05-06 02:38:02 +00:00
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
set -ex \
2024-04-02 16:11:41 +00:00
&& apt-get update \
&& apt-get -y install --no-install-recommends ${TOOLS}
2024-04-02 16:11:41 +00:00
COPY --from=build-core /opt/py3 /opt/py3
COPY --from=build-xpack /opt/xpack /opt/jumpserver/apps/xpack