Docker on Kali Linux
General Information about Docker
The concept of Docker is packaging of programs and entire operating systems in containers. These containers are easy to deploy. They can be quickly reset to their original state. You can have several identical programs with different settings. The program is distributed with all necessary dependencies – easy to install.
In addition to the advantages, there are a number of disadvantages and inconveniences: problems with direct access to the hardware, to the graphical interface, if you need a certain program, then you will get it with the entire operating system (!), etc.
IMHO, only for Docker fans. But you need to be able to work with Docker at least for the reason that some authors use Docker as the preferred method of distributing their programs.
How to install Docker in Kali Linux
sudo apt update sudo apt install docker.io sudo systemctl enable docker.socket
How to use Docker in Kali Linux
Search for a container, for example, with airgeddon:
docker search airgeddon
It will be shown:
NAME DESCRIPTION STARS OFFICIAL AUTOMATED v1s1t0r1sh3r3/airgeddon Official airgeddon script docker image. Chec… 14 [OK]
Once you have decided which image to use, you can download it to your machine using the pull command:
docker pull v1s1t0r1sh3r3/airgeddon
By the way, the container update is performed in the same way:
docker pull container/full_name
After the image is loaded, you can start the container with the run command. If at the time of the execution of the run command the image has not yet been downloaded, the Docker client will first load the image and then launch the container with this image:
docker run v1s1t0r1sh3r3/airgeddon
To view the downloaded images to your machine, enter:
docker images
As an example, run the container using the latest version of the Kali Linux image. The combination of the -i and -t keys allows for interactive access to the container:
docker run -it kalilinux/kali-linux-docker
To exit:
exit
To see running containers:
docker ps
To see all containers:
docker ps -a
Remember that with each ‘normal’ start a new clone of the container is created!!! To run a previously running container, it must be specified explicitly.
To run an earlier created container:
docker start -ai CONTAINER_ID
To stop a container:
docker stop CONTAINER_ID
To remove a container:
docker rm CONTAINER_ID
To remove a docker image:
docker rmi IMAGE_NAME
Related articles:
- How to update Kali Linux (100%)
- How to replace Default Desktop Environment with Cinnamon in Kali Linux (100%)
- How to configure Kali Linux to use a static IP address (100%)
- How to install Guake in Kali Linux (100%)
- How to Install Total Commander Counterpart in Kali Linux (100%)
- Where to download Kali Linux and how to verify the integrity of Kali Linux images (RANDOM - 40.5%)
Thank you. This made it very easy for me to figure out how to get Docker going.