DOCKER
If you ever heard of virtualization, then there is a big chance that you’ve heard of Docker!
Docker is a software development platform that can also provide virtualization. Unlike other types of VM, Docker uses containers instead of hypervisors, which means instead of sharing resources at a hardware level, Docker takes advantage of operating systems for resources. This means that your resources can change depending on your tasks running. You can learn more about it here.
Windows Subsystem for Linux (WSL)
After Microsoft’s announcement of WSL (Windows Subsystems for Linux), now it’s possible to run different Linux kernels directly inside Windows. With that, Docker also can run Linux kernels natively inside Windows. You can learn more about WSL here.
PARROT OS
Parrot OS is a security-focused kernel just like Kali Linux. It comes with all the bells and whistles, and most of the tools that you need to start hacking. You can learn about Parrot OS here.
Now that you have a general understanding of Docker, WSL, and Parrot OS, we can go ahead and start the process.
Installing WSL on Windows
Step 1
The first thing that we need to do is to prepare Windows and install WSL on it. To do that, You need to open “Power Shell” as administrator and run the code below:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
Step 2
In order to update to WSL2, you’ll need to meet some requirements.
- You must be running Windows 10.
- For x64 systems: Version 1903 or higher, with Build 18362 or higher.
- For ARM64 systems: Version 2004 or higher, with Build 19041 or higher.
- Builds lower than 18362 do not support WSL 2. Use the Windows Update Assistant to update your version of Windows.
To check your windows version, press the Windows logo key + R, or search “Run” from the start menu. Then type winver in the Open box and hit enter. Figure 04, 05, and 06 will help you more with the process.
If you’re not running Version 1903 or higher, please use the Windows Update Assistant to update your version of Windows. Otherwise, proceed to the next step.
Step 3
Open PowerShell as administrator again and run the code below.
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
Please restart your computer to apply changes.
Step 4 (Optional)
At this point, We’re done with the WSL installation process. But here is a good tip to check your WSL version. To do that, you’ll need to open “PowerShell ”and run the command below:
wsl -l -v
Note: Nothing might show up if you don’t have any Linux kernels running.
Installing Docker on Windows
This part is pretty straight forward, go to Docker’s website, download and install the Docker Desktop for Windows.
Installing Parrot OS container
Please take a second and look at Docker images for Parrot OS here before we start this section.
As you can see, there are many different containers, and each comes with different sets of tools. We’re going to use “Parrot Security” as it comes with an enormous collection of tools.
First, we need to pull the container by searching “CMD” from the start menu and copy the code below inside it.
docker pull parrotsec/security
To save this container for later use, we have to give it a name. Before executing the code below, please take a look at Figure10_docker_options to have a better understanding of docker options.
docker run -it --name parrotos parrotsec/security
- Docker Options:
- - -name = I chose “parrotos” but this can be anything you like, ex rickandmorty, blackandwhite, hack, etc.
You run your container at any time by running the code below.
docker exec -it parrotos bash
Congratulation, you’ve successfully running Parrot OS on Docker inside windows.
The last thing that I will show you is some of Docker’s commands that I found useful during my journey.
To start a container
docker start [container_name]ex:
docker start parrotos
To stop a container
docker stop [container_name]ex:
docker stop parrotos
To see your containers
docker ps
To see the status of your containers
docker stats
To run an existing container
docker exec -it [container_name] (option)ex:
docker exec -it parrotos bash
To exit from an existing container
ctrl + d