blairy/kali-ready-to-roll

By blairy

Updated 1 day ago

The latest kali-rolling with kali-linux-headless and wordlists installed.

Image

2.9K

kali-ready-to-roll

image

The latest kali-rolling with the complete kali-linux-headless installation.

Wordlists installed.

All packages up to date.


Git Repository: kali-ready-to-roll



Dockerfile
FROM kalilinux/kali-rolling

# Update repos and install tools needed to complete build successfully. 
RUN \
  apt -y update \
  && DEBIAN_FRONTEND='noninteractive' \
  apt -y install --no-install-recommends \
  apt-utils \
  apt-transport-https \
  ca-certificates \
  libllvm15 \
  tzdata \
  console-setup \
  webscarab

# Set local timezone
ENV TZ=Australia/Brisbane

# Perform installation of all Kali packages
RUN \
  DEBIAN_FRONTEND='noninteractive' \ 
    apt -y install --no-install-recommends kali-linux-headless

# Install wordlists 
RUN \
  DEBIAN_FRONTEND='noninteractive' \ 
    apt -y install --no-install-recommends seclists

# Extract rockyou.txt and remove archive
RUN \
  gunzip /usr/share/wordlists/rockyou.txt.gz
  
# Final confirmation that packages are up to date
RUN \
  apt -y update \
  && DEBIAN_FRONTEND='noninteractive' apt -y upgrade \
  && DEBIAN_FRONTEND='noninteractive' apt autoremove

USER root
ENTRYPOINT ["/bin/bash"]


Build Script
#!/usr/bin/env bash

except() {
  local message
  message="$1"
  readonly message
  printf "Error! - " + "${message}"
    + "\nBuild process will now exit."
  exit 1
}

configure() {
  local path
  local image_name
  path="$1"
  image_name="$2"
  readonly path
  readonly image_name
  build "${path}" "${image_name}" || except "Docker Build Failed, see journalctl and build.log for more information."
}

build() {
  local path
  local image_name
  path="$1"
  image_name="$2"
  readonly path
  readonly image_name
  docker build --pull -t "${image_name}" "${path}" 2>&1 | tee "${path}"/build.log 
}

push() {
  local name
  name="$1"
  readonly name
  docker push "${name}"
}

main() {
  local path
  local timestamp
  local name
  path="${USERHOME}"/docker/kali
  readonly path
  timestamp=$(/usr/bin/date +%Y%m%d_%H%M)
  readonly timestamp
  name="docker.io/blairy/kali-ready-to-roll:""${timestamp}"
  readonly name 
  configure "${path}" "${name}" || except "Failed to configure the image name and path." 
  push "${name}" || except "Failed to push image to Docker hub"
}

main "$@"

Docker Pull Command

docker pull blairy/kali-ready-to-roll