@@ -155,6 +155,31 @@ COPY --from=build /install /install
155155COPY --from=rs-binaries /install/usr/local/bin/openvasd /install/usr/local/bin/openvasd
156156COPY --from=rs-binaries /install/usr/local/bin/scannerctl /install/usr/local/bin/scannerctl
157157
158+ FROM ${FINAL_IMAGE} AS pypsrp-cli-build
159+ ARG VERSION
160+ RUN if ! printf '%s' "${VERSION}" | grep -q -- '-edge$' ; then \
161+ suite_name="${VERSION}" ; \
162+ if [ "${suite_name}" = "latest" ]; then suite_name=stable; fi; \
163+ . /etc/os-release && sed -i "s/${suite_name}/$VERSION_CODENAME/g" /etc/apt/sources.list.d/*.sources; \
164+ fi
165+ RUN apt-get update \
166+ && DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --no-install-suggests -y \
167+ gcc \
168+ git \
169+ krb5-user \
170+ libkrb5-dev \
171+ python3 \
172+ python3-cryptography \
173+ python3-dev \
174+ python3-gssapi \
175+ python3-pip \
176+ python3-requests \
177+ && rm -rf /var/lib/apt/lists/*
178+ RUN git clone --depth 1 https://github.com/greenbone/pypsrp-cli.git /tmp/pypsrp-cli \
179+ && python3 -m pip install --break-system-packages --no-cache-dir --root /install /tmp/pypsrp-cli \
180+ && test -x /install/usr/local/bin/pypsrp-cli \
181+ && rm -rf /tmp/pypsrp-cli
182+
158183FROM ${FINAL_IMAGE}
159184ARG VERSION
160185ARG FINAL_PACKAGE_SET
@@ -169,12 +194,19 @@ RUN if ! printf '%s' "${VERSION}" | grep -q -- '-edge$'; then \
169194RUN test -f "/tmp/openvas-packages/${FINAL_PACKAGE_SET}.txt" \
170195 && apt-get update \
171196 && xargs -a "/tmp/openvas-packages/${FINAL_PACKAGE_SET}.txt" apt-get install --no-install-recommends --no-install-suggests -y \
197+ && DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --no-install-suggests -y \
198+ krb5-user \
199+ python3 \
200+ python3-cryptography \
201+ python3-gssapi \
202+ python3-requests \
172203 && rm -rf /var/lib/apt/lists/*
173204
174205# must be pre built within the rust dir and moved to the bin dir
175206# usually this image is created within in a ci ensuring that the
176207# binary is available.
177208COPY --from=prepared /install/ /
209+ COPY --from=pypsrp-cli-build /install/usr/local/ /usr/local/
178210COPY --from=openvas-smb /usr/local/lib/ /usr/local/lib/
179211COPY --from=openvas-smb /usr/local/bin/ /usr/local/bin/
180212RUN ldconfig
0 commit comments