Last active
August 11, 2021 04:54
-
-
Save robert-moses/ca03d4e2f8bd27b7c4ac362820d6ad32 to your computer and use it in GitHub Desktop.
Kali Windows Docker (persistent storage)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker run -ti --rm --mount src=kali-root,dst=/root --mount src=kali-postgres,dst=/var/lib/postgresql my-kali | |
# | |
# Notes to setup/run a persistent kali docker container (my notes to setup on my usual windows work PC) | |
# credit to @Airman604 | |
# https://medium.com/@airman604/kali-linux-in-a-docker-container-5a06311624eb | |
# https://hub.docker.com/r/kalilinux/kali-linux-docker/ | |
# https://www.kali.org/news/official-kali-linux-docker-images/ | |
# https://hub.docker.com/?ref=login&overlay=onboarding | |
# Setup Docker Desktop for Windows | |
# Requires Windows10 Pro and Hyper-V | |
# Enable experimental features (Daemon) | |
docker pull kalilinux/kali-linux-docker | |
docker run -t -i kalilinux/kali-linux-docker /bin/bash | |
# Inside the container | |
# Update Kali | |
apt-get update && apt-get upgrade && apt-get dist-upgrade | |
apt-get install kali-linux-top10 man-db exploitdb | |
apt-get install nmap wpscan netcat dirb nikto binwalk git arp-scan dns-utils | |
apt-get install metasploit-framework | |
# exit | |
# post update and persist | |
docker ps -a | |
docker commit <CONTAINER ID> my-kali | |
# launch kali docker | |
docker run -ti --rm --mount src=kali-root,dst=/root --mount src=kali-postgres,dst=/var/lib/postgresql my-kali |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
I followed these instructions but when I try to initialize msfdb I receive the error “postgres selected: no connection”