Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,25 @@ COPY ./krr.py krr.py
COPY ./robusta_krr/ robusta_krr/
COPY ./intro.txt intro.txt

# Remove unused OS packages with unfixed CVEs (perl-base: 4 CRITICAL; util-linux
# family: HIGH). dpkg exits non-zero on essential-package warnings even on
# success, so removals and runtime sanity are verified explicitly instead.
RUN dpkg --purge --force-remove-essential --force-depends \
perl-base \
util-linux bsdutils mount \
libmount1 libblkid1 libsmartcols1 liblastlog2-2 libuuid1 \
; rm -rf /var/lib/apt/lists/* \
&& for p in perl-base util-linux bsdutils mount libmount1 libblkid1 \
libsmartcols1 liblastlog2-2 libuuid1; do \
status="$(dpkg-query -W -f='${db:Status-Status}' "$p" 2>/dev/null || true)"; \
if [ -n "$status" ] && [ "$status" != "not-installed" ]; then \
echo "ERROR: $p was not removed (status: $status)" >&2; exit 1; \
fi; \
Comment thread
moshemorad marked this conversation as resolved.
done \
&& python -c "import robusta_krr" \
&& python -c "import uuid; uuid.uuid4(); uuid.uuid1(); uuid.getnode()" \
&& bash -c 'echo bash-ok' \
&& echo "purge verified"

# Run the application using 'poetry run krr simple'
CMD ["python", "krr.py", "simple"]
Loading
Loading