I have been following Jerry Gamblin’s (Twitter: @jgamblin) excellent work on dockerizing hacking tools, and decided to try my first project, I wanted to give a shot at dockerizing the infamous Metasploit Framework.

Please be aware that I am very inexperienced with Docker, therefore you may find many different errors or inconsistencies.

The first one is that I basically had to build the container interactively in order to be able to install the Metasploit Framework from Github. I really tried to do it via dockerfile but was not able to, maybe you can give it a try and share yours with me (Twitter: @enocarlos)!

You can pull the Docker image from here. I know the container can use some cleaning because it is huge (1.8Gb.).

The container includes:

Ubuntu 14.04, Metasploit, OpenBox and NoVNC.

To get it started run:

docker run -d -t -i -p 6080:6080 carloss7/msf_browser

And then direct your browser to:


Once it loads you’ll get a black screen in your browser, just right-click on it and then choose Terminal emulator:


You should get a Terminal:


And this is where you can see the other details that I was not able to correct, from there cd /opt/metasploit-framework, then source /usr/local/rvm/scripts/rvm, and then type the so-desired command: msfconsole:


And there you go:


Here is what’s included in the dockerfile:

FROM msf_browser:latest

ENV DEBIAN_FRONTEND noninteractive

RUN apt-get update -y && \
apt-get install -y \
net-tools \
openbox \
git \
x11vnc \
xvfb \
wget \
python \
python-numpy \
unzip \
geany \
iceweasel menu && \

cd /root && git clone && \
cd noVNC/utils && git clone websockify && \
cd /root

RUN cd /opt/metasploit-framework
RUN bash -c 'source /usr/local/rvm/scripts/rvm'


RUN chmod 0755 / && \
apt-get autoremove && \
rm -rf /var/lib/apt/lists/*