I am following this tutorial .
sudo apt update sudo apt install curl docker.io -y sudo usermod -aG docker debian newgrp docker
Paste in the code below.mkdir nmap-server cd nmap-server nano Dockerfile
Your code should look like the image below.FROM debian MAINTAINER YOURNAME RUN apt-get update && \ apt-get install -y nmap iproute2 && \ apt-get clean ENTRYPOINT ["/usr/bin/nmap"] CMD ["-sn", "-v", "172.17.0.1-10"] # Scan docker network 172.17.0.1-10 for running containers
Save the file with Ctrl+x, y, Enter.
Your build should succeed, as shown below.docker build -t yourname/nmap-server:1.0 .
Troubleshooting
If you get error messages like:Failed to fetch http://deb.debian.org/debian/dists/bookworm/InRelease Temporary failure resolving 'deb.debian.org'
Execute this command to restart Docker:sudo service docker restart
The container runs an Nmap scan, as shown below.docker images docker run yourname/nmap-server:1.0
Flag H 151.1: Viewing the Container (10 pts)
On your Linux server, execute this command:The flag is covered by a green rectangle in the image below.docker ps -a
Posted 3-8-25
Final image fixed 3-12-25
Video added 3-26-25