- Установка docker kali linux
- How to Install Docker on Kali Linux 2020.1
- Docker Usage
- Step 1: Configure APT Keys
- Step 2: Get PGP Key for official Docker
- Step 3: Configure APT to Download, Install, and Update Docker
- Step 4: Install Docker
- Step 5: Update the APT Again
- Step 6: Terminate Outdated Versions Previously Installed
- Step 7: Install Docker on Kali System
- Step 8: Start the Docker Container
- (Optional) Step 9: Set up Docker to Start Automatically on Reboot
- Step 10: Verify Installation
- Conclusion
- About the author
- Younis Said
- How to Install Docker Desktop on Kali Linux
- Table of Contents
- How to Install Docker Desktop on Kali Linux
- Prerequisites
- Install Docker APT Repository
- How to Install Docker Desktop on Kali Linux
- Running containers
- Configure Docker Desktop on Kali Linux
- General tab
- Resources tab
- How to Uninstall Docker Desktop on Kali Linux
- Other Tutorials
- SUPPORT US VIA A VIRTUAL CUP OF COFFEE
Установка docker kali linux
To install Docker on Kali you need to remember that there is already a package named “docker”, therefore Docker has to be installed under a different name. If you install docker you will not end up with the container version. The version we will be installing is named docker.io . All commands are the same however, so running docker on the command line will be the appropriate command:
[email protected]:~$ sudo apt update [email protected]:~$ [email protected]:~$ sudo apt install -y docker.io [email protected]:~$ [email protected]:~$ sudo systemctl enable docker --now [email protected]:~$ [email protected]:~$ docker [email protected]:~$
You can now get started with using docker, with sudo . If you want to add yourself to the docker group to use docker without sudo , an additional step is needed:
[email protected]:~$ sudo usermod -aG docker $USER [email protected]:~$
The final thing is to logout and in again.
If you would like to use a Kali Docker image, we have a doc page for that here.
Installing docker-ce on Kali Linux
docker-ce can be installed from Docker repository. One thing to bear in mind, Kali Linux is based on Debian, so we need to use Debian’s current stable version (even though Kali Linux is a rolling distribution). At the time of writing (Dec. 2021), its “bullseye”:
[email protected]:~$ printf '%s\n' "deb https://download.docker.com/linux/debian bullseye stable" | sudo tee /etc/apt/sources.list.d/docker-ce.list
[email protected]:~$ curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/docker-ce-archive-keyring.gpg
Install the latest version of docker-ce :
[email protected]:~$ sudo apt update [email protected]:~$ sudo apt install -y docker-ce docker-ce-cli containerd.io
How to Install Docker on Kali Linux 2020.1
Docker is one of the most popular tools for pentesters, as well as ethical hackers. This tool acts as a container for running tools without installing them. In this article, I will show you the easiest way to install Docker on Kali Linux and get it running in less than 5 minutes. This tutorial has 10 easy-to-follow steps and is also compatible with the new feature called “non-root user by default,” introduced by the latest 2020 Kali Linux.
Docker Usage
Working as a pentester, you would not limit your usage to the pre-installed tools within Kali Linux. You would have to use a lot of different tools from different repositories. Installing these tools in your Kali Linux root repository is time consuming when you have many tools to install. Docker is a run-time container for all tools and creates isolated containers for you to install your tools.
Step 1: Configure APT Keys
Always perform APT updating:
Step 2: Get PGP Key for official Docker
Step 3: Configure APT to Download, Install, and Update Docker
$ echo ‘deb [arch=amd64] https://download.docker.com/linux/debian buster stable’ |
sudo tee / etc / apt / sources.list.d / docker.list
If everything is set up properly, then you will see a terminal window that appears as follows:
Step 4: Install Docker
The installation process I am following is given in Docker official documentation but as it has some minor bugs, I have added some commands to ensure proper installation. For this purpose, the following set of commands should be executed:
Step 5: Update the APT Again
Step 6: Terminate Outdated Versions Previously Installed
Step 7: Install Docker on Kali System
In the above command, “-y” stands for the “yes” condition. When installing a tool in the terminal, the user will be asked for permission to install the tool.
If the above steps have been performed correctly, than you will be able to see the following output on your terminal window:
Step 8: Start the Docker Container
(Optional) Step 9: Set up Docker to Start Automatically on Reboot
This is an optional feature command; it will start Docker every time your OS boots. If you do not perform pentesting a lot, then you do not need to enable this feature.
Step 10: Verify Installation
The following command is taken from Docker official documentation. This command verifies if Docker is working.
The warning you see on the terminal window is normal, and Docker is working successfully. You should be able to see the following text on your terminal window:
Conclusion
Docker is a useful tool for penetration testing, and it is becoming more popular day by day. It can be helpful to work inside an isolated container, particularly while working with pentesting.
About the author
Younis Said
I am a freelancing software project developer, a software engineering graduate and a content writer. I love working with Linux and open-source software.
How to Install Docker Desktop on Kali Linux
How can you install Docker desktop on Linux? In this tutorial, you will learn how to install Docker desktop on Kali Linux. Docker Desktop is an easy-to-install program for Mac, Linux, or Windows environments which offers a straightforward interface that lets you manage your containers, apps, and images from your machine.
Table of Contents
How to Install Docker Desktop on Kali Linux
The steps below outline how to Docker Desktop on Kali Linux.
Prerequisites
Check the requirements for installing Docker Desktop before you can proceed.
Install Docker APT Repository
sudo apt -y install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/debian/gpg | \ sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/docker-archive-keyring.gpg
echo \ "deb [arch=amd64] https://download.docker.com/linux/debian bullseye stable" | \ sudo tee /etc/apt/sources.list.d/docker.list
sudo apt install docker-ce docker-ce-cli containerd.io uidmap
● docker.service - Docker Application Container Engine Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled) Active: active (running) since Mon 2023-02-27 13:45:50 EST; 1min 10s ago TriggeredBy: ● docker.socket Docs: https://docs.docker.com Main PID: 31797 (dockerd) Tasks: 7 Memory: 30.1M CPU: 231ms CGroup: /system.slice/docker.service └─31797 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock Feb 27 13:45:50 kali dockerd[31797]: time="2023-02-27T13:45:50.010221210-05:00" level=info msg="[core] [Channel #4 SubChannel #5] Subchannel Connectivity change to READY" module=grpc Feb 27 13:45:50 kali dockerd[31797]: time="2023-02-27T13:45:50.010326868-05:00" level=info msg="[core] [Channel #4] Channel Connectivity change to READY" module=grpc Feb 27 13:45:50 kali dockerd[31797]: time="2023-02-27T13:45:50.077018506-05:00" level=info msg="Loading containers: start." Feb 27 13:45:50 kali dockerd[31797]: time="2023-02-27T13:45:50.266661694-05:00" level=info msg="Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --bip can be used to set a preferred IP address" Feb 27 13:45:50 kali dockerd[31797]: time="2023-02-27T13:45:50.370958613-05:00" level=info msg="Loading containers: done." Feb 27 13:45:50 kali dockerd[31797]: time="2023-02-27T13:45:50.418416285-05:00" level=info msg="Docker daemon" commit=bc3805a graphdriver=overlay2 version=23.0.1 Feb 27 13:45:50 kali dockerd[31797]: time="2023-02-27T13:45:50.418766947-05:00" level=info msg="Daemon has completed initialization" Feb 27 13:45:50 kali dockerd[31797]: time="2023-02-27T13:45:50.458777536-05:00" level=info msg="[core] [Server #7] Server created" module=grpc Feb 27 13:45:50 kali systemd[1]: Started Docker Application Container Engine. Feb 27 13:45:50 kali dockerd[31797]: time="2023-02-27T13:45:50.466014891-05:00" level=info msg="API listen on /run/docker.sock"
sudo systemctl start docker
- After the Docker installation, add your user account to the docker group using the following command.
sudo usermod -aG docker $USER
How to Install Docker Desktop on Kali Linux
- Navigate to the Docker Desktop download page and get the latest Linux DEB download link and download it using wget the command as shown below.
wget https://desktop.docker.com/linux/main/amd64/docker-desktop-4.16.2-amd64.deb
sudo apt install ./docker-desktop-*-amd64.deb
Client: Docker Engine - Community Version: 23.0.1 API version: 1.42 Go version: go1.19.5 Git commit: a5ee5b1 Built: Thu Feb 9 19:46:54 2023 OS/Arch: linux/amd64 Context: default Server: Docker Engine - Community Engine: Version: 23.0.1 API version: 1.42 (minimum version 1.12) Go version: go1.19.5 Git commit: bc3805a Built: Thu Feb 9 19:46:54 2023 OS/Arch: linux/amd64 Experimental: false containerd: Version: 1.6.18 GitCommit: 2456e983eb9e37e47538f59ea18f2043c9a73640 runc: Version: 1.1.4 GitCommit: v1.1.4-0-g5fd4c4d docker-init: Version: 0.19.0 GitCommit: de40ad0
- And that is it on how to install Docker Desktop on Kali Linux. You can also launch Docker Desktop from the terminal using the command below.
systemctl --user start docker-desktop
systemctl --user enable docker-desktop
systemctl --user stop docker-desktop
- Wait for it to start.
- If you decided to run Docker desktop on VirtualBox VM, be sure to enable nested virtualization for that specific VM. Otherwise, when you try to start Docker Desktop, you will see Docker Desktop stopped…
- To enable nested virtualization for specific VM, poweroff the VM and run;
vboxmanage modifyvm --nested-hw-virt on
- You can either choose to go through the tutorial or skip.
- Then you will be redirected to the Containers page after skipping or going through the tutorial.
Running containers
- On the home page, we will run the Redis container as an example. You can as well copy the example docker run command and execute it on the terminal.
- To run Redis container under guides, click on Run option and then select the directory where Docker will store static content.
- When you click Run, the container images will be pulled and Docker container created over it.
- You can view container logs, inspect it, open the terminal for the container, check metrics e.t.c
- You can search the images from Docker hub and run containers using them;
Configure Docker Desktop on Kali Linux
General tab
- You can configure Docker Desktop to start when you log in from the settings menu.
- Alternatively, you can use the command
systemctl --user enable docker-desktop
- Choose a theme for Docker Desktop.
- Show weekly tips which are simply recommendations.
- Open Docker Dashboard at startup
- Enable Docker Compose V1/V2 compatibility mode which allows you to switch between V1 or V2.
Resources tab
- On the resource tab, you can limit resources according to your preference, configure file sharing, and configure proxies and networks.
- Other configurations are available on the settings option such as Docker Engine, Kubernetes, Software updates, Extensions, etc.
How to Uninstall Docker Desktop on Kali Linux
sudo apt remove --purge --auto-remove docker-desktop
Other Tutorials
SUPPORT US VIA A VIRTUAL CUP OF COFFEE
We’re passionate about sharing our knowledge and experiences with you through our blog. If you appreciate our efforts, consider buying us a virtual coffee. Your support keeps us motivated and enables us to continually improve, ensuring that we can provide you with the best content possible. Thank you for being a coffee-fueled champion of our work!