mirror of https://github.com/jumpserver/jumpserver
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
1.1 KiB
35 lines
1.1 KiB
ARG VERSION=dev |
|
|
|
FROM registry.fit2cloud.com/jumpserver/xpack:${VERSION} AS build-xpack |
|
FROM jumpserver/core:${VERSION}-ce |
|
|
|
COPY --from=build-xpack /opt/xpack /opt/jumpserver/apps/xpack |
|
|
|
ARG TOOLS=" \ |
|
g++ \ |
|
curl \ |
|
iputils-ping \ |
|
netcat-openbsd \ |
|
nmap \ |
|
telnet \ |
|
vim \ |
|
wget" |
|
|
|
ARG APT_MIRROR=http://deb.debian.org |
|
RUN set -ex \ |
|
&& rm -f /etc/apt/apt.conf.d/docker-clean \ |
|
&& 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 \ |
|
&& apt-get update \ |
|
&& apt-get -y install --no-install-recommends ${TOOLS} \ |
|
&& echo "no" | dpkg-reconfigure dash |
|
|
|
WORKDIR /opt/jumpserver |
|
|
|
ARG PIP_MIRROR=https://pypi.org/simple |
|
COPY poetry.lock pyproject.toml ./ |
|
RUN set -ex \ |
|
&& . /opt/py3/bin/activate \ |
|
&& pip install poetry -i ${PIP_MIRROR} \ |
|
&& poetry install --only xpack |
|
|
|
|