So first let’s talk about what docker is.
is a set of platform as a service (PaaS) products that use OS-level virtualization to deliver software in packages called containers. Containers are isolated from one another and bundle their own software, libraries and configuration files; they can communicate with each other through well-defined channels. Because all of the containers share the services of a single operating system kernel, they use fewer resources than virtual machines.
CC: Docker (software) - Wikipedia
That is what docker is as per wikipedia.
If I were to break it down in layman terms:
Docker is a software that one can use to run different Operating Systems(OS) in a containerized environment.
What we are going to do today is to try enable the docker support on Android.
This is not natively possible and requires the person to recompile the kernel with the required configurations enabled.
Bear in mind this guide is not for newbies because the terms used in this guide is specifically geared towards kernel developers!
First off, download the patching script
wget https://raw.githubusercontent.com/cyberknight777/Kali-NetHunter/main/scripts/docker.sh;chmod 777 docker.sh
Then you’d need to execute the script with the path to kernel tree as an argument.
Once that’s done follow instructions given by script to enable the required configurations and then compile the kernel :).
After compiling the kernel, flash it and then install PWN-TERM.
After running setup, install docker via
apt install docker
Open a new session and run
sudo docker pull arm64v8/debian
sudo docker run -ti --net=host arm64v8/debian
And Voila!, you will be in a containerized debian environment.
To get network access you would probably need to check /etc/resolv.conf. If that file is empty, run this
echo “nameserver 22.214.171.124” > /etc/resolv.conf
Once that’s done you’d need to do this in all other operating systems except for alpine
groupadd -g 3003 aid_inet && usermod -G nogroup -g aid_inet _apt
Next just try doing apt update and you will see that network is working.
Some people I’d like to mention for their work in docker:-
@FreddieOliveira for his great guide.
@martinvlba for his PWN-TERM and docker package modifications.
@Xeffyr for his work in adding docker package in termux and helping in getting network working in containers.
Stay tuned for more interesting Content!