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