From 29bce6cf165835fcb425b3fd364131ee1598eb55 Mon Sep 17 00:00:00 2001 From: Abin-Sec Date: Tue, 4 Nov 2025 04:22:39 -0500 Subject: [PATCH] Update Dockerfile for APT sources and package installation Updated the Dockerfile to modify APT sources and install base packages. There was an issue while updating the Kali Docker image, so the /etc/apt/sources.list entries were changed from http to https to resolve it. Additionally, while installing the Kali Linux core tools, the --fix-missing flag was added to address an installation error. --- kali/Dockerfile | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/kali/Dockerfile b/kali/Dockerfile index c8b448a..ccf56cf 100644 --- a/kali/Dockerfile +++ b/kali/Dockerfile @@ -2,8 +2,28 @@ FROM kalilinux/kali-rolling ENV USER=root +RUN set -eux; \ + sed -i 's|https://http.kali.org|http://http.kali.org|' /etc/apt/sources.list || true; \ + apt-get clean; \ + apt-get update; \ + apt-get install -y --no-install-recommends ca-certificates; \ + sed -i 's|http://http.kali.org|https://http.kali.org|' /etc/apt/sources.list; \ + apt-get update --fix-missing; \ + apt-get -y full-upgrade + +# ------------------------------------------------------------------------------ +# 1) Base packages, Kali/Debian tools, and common deps +# ------------------------------------------------------------------------------ +# ------------------------------------------------------------------------------ +# 1) Base packages, Kali/Debian tools, and common deps +# ------------------------------------------------------------------------------ +RUN set -eux; \ + apt-get update; \ + apt-get install -y --no-install-recommends \ + sudo ca-certificates curl wget git zsh bash coreutils + # Install core services and additional desktop packages -RUN apt-get update && \ +RUN apt-get update && \ apt-get install -y --no-install-recommends \ openssh-server \ shellinabox \ @@ -50,7 +70,7 @@ RUN apt-get update && \ && rm -rf /var/lib/apt/lists/* # installing Kali Linux core tools (Comment this out if you want a smaller and faster image build) -RUN apt-get update && \ +RUN apt-get update --fix-missing && \ DEBIAN_FRONTEND=noninteractive apt-get install -y \ kali-linux-headless \ kali-linux-core \