Open In App

How to Install Kali Docker Image to the Linux ?

Improve
Improve
Like Article
Like
Save
Share
Report

In the cybersecurity sector, Kali is a prominent security distribution. Penetration testers, in particular, adore it. Kali has a number of security exploitation tools that may be used to test various systems, such as servers, networks, application servers, databases, VoIP, and so on. Kali is available in a variety of formats, including a virtual machine, an ISO file, a USB image, and a container.

Installing kali in Docker

To install docker,  run the following command:

$ sudo apt-get install docker.io

Installing Docker

Docker is a daemon service that runs in the background. This service must be started before we can use Docker. There are a variety of service and daemon management tools available, but they all support sytemctl.

$ sudo systemctl start docker

Starting Docker

The status option can be used to examine the status of a Docker service.

$ sudo systemctl status docker

Checking docker service status

We can now use the docker command to locate the Kali Docker image. To identify accessible Kali container images in the Docker Hub, we’ll use the search subcommand with the kali keyword.

$ sudo docker search kali

Searching kali image

Now choose the most popular one, which is offered by kali developers.

We’ll use the pull subcommand to get a Kali container image from the Docker Repository, as seen below. Container pictures are downloaded in many parts and employ a layered file structure. This has the advantage of allowing you to make several containers from a single image because just the altered parts of the image will be copied, while the rest of the image will be used by numerous containers without issue.

$ sudo docker pull kalilinux/kali-rolling

Installing container image

Now choose the most popular one, which is offered by kali developers.

The run subcommand will be used to start the container. However, there are a few options that we should present. How can we connect to Kali after the container has started? We’ll use the -t and -i options to indicate that we’d like to connect to the terminal interactively.

$ sudo docker run -t -i kalilinux/kali-rolling

Running the container

We should update the Kali container’s package metadata because it contains outdated utilities. Another reason is that apt does not have up-to-date and complete package information. The following command will be used to update package information.

$ apt-get update

Updating packages

The Kali container comes with relatively few tools by default. Using apt package management, we should install the essential tools. In the following example, we will install nmap.

$ apt install nmap -y

Installing nmap

Dockers are the most efficient way to distribute and deploy your packages. The Kali Linux docker image is quite useful; it doesn’t take up a lot of disc space, and it’s now very simple to test this amazing distro on any docker-enabled operating system.


Last Updated : 29 Jun, 2021
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads