Using Docker To Install OpenVAS On CentOS

1 minute read


Saw a post on r/sysadmin the other day with a walkthrough on using Docker for the first time. Thought I would take some notes:

To Resolve:

  1. On the host computer, open up Hyper V and create a new Virtual Machine. Download the Centos7 iso if you don’t already have it.

  2. Before starting the virtual machine, we need to edit its properties:

2a. Change UEFI option to UEFI Authority

2b. Change Network Adapter to Enable MAC Address spoofing

2c. Enable Nested Virtualization. On the host machine, open Powershell as admin and type:

Set-Vmprocessor -Vmname Docker -Enablevirtualizationextensions $True
  1. Install Centos7 minimal on a Virtual Machine.

  2. Update it and give it a static IP, and install Docker stuff:

# Update:
sudo yum update

# Set a static ip =

# Install docker
yum install -y yum-utils device-mapper-persistent-data lvm2
yum-config-manager --add-repo
yum-config-manager --enable docker--ce-edge
yum-config-manager --enable docker--ce-test
yum install docker-ce

# Start and enable docker
systemctl start docker
systemctl enable docker
  1. Now that docker is installed, we can search for images to run. For example, let’s install OpenVAS:
# Search docker images:
docker search openvas

# Download an image
docker pull mikesplain/openvas

# See images
docker images
  1. Now lets start and run it:
# To run: The command breakdown is: -d is background (detach), -p is ports, --name is just a name, and last is the image file.
docker run -d -p 443:443 -p 9390:9390 --name openvas mikesplain/openvas

# To see running docker images:
docker ps

# To see installation logs
docker logs -ft mikesplain/openvas

# Add firewall exceptions:
firewall-cmd --zone=public --add-port=443/tcp --permanent
firewall-cmd --zone=public --add-port=9390/tcp --permanent
firewall-cmd --reload

# To see all containers created, but some may be offline
docker ps -a
  1. That is it, if you want to see the OpenVAS web GUI, just go to (if the Centos VM static IP is in a browser on CentOS. It should bring up OpenVAS login! Creds are ‘admin/admin’