diff --git a/metasploit/Dockerfile b/metasploit/Dockerfile new file mode 100644 index 0000000..143872c --- /dev/null +++ b/metasploit/Dockerfile @@ -0,0 +1,11 @@ +FROM kalilinux/kali-linux-docker +MAINTAINER Christian Koep + +RUN apt-get update && apt-get install -y \ + metasploit-framework \ + --no-install-recommends \ + && rm -rf /var/lib/apt/lists/* + +COPY start.sh /start.sh + +ENTRYPOINT [ "/start.sh" ] diff --git a/metasploit/start.sh b/metasploit/start.sh new file mode 100755 index 0000000..e40608a --- /dev/null +++ b/metasploit/start.sh @@ -0,0 +1,15 @@ +#!/bin/sh +set -e + +if ! [ -e "/var/run/postgresql/*.pid" ] +then + /etc/init.d/postgresql start +fi + +if ! [ -e "/usr/share/metasploit-framework/config/database.yml" ] +then + /usr/bin/msfdb init +fi + +/usr/bin/msfdb start +/usr/bin/msfconsole