docker
Installation
To make sure that I have docker engine, docker compose and nginx installed.
Depending on the image you are going to compose you will need nginx or other dependencies.
Another way, see https://www.kali.org/docs/containers/installing-docker-on-kali/
sudo apt update
sudo apt install -y docker.io
sudo systemctl enable docker --now
docker
sudo usermod -aG docker $USER
Basic commands
# show all processes
docker ps -a
# Actions on dockerInstance/PID/part of id if unique: restart, stop, start, status
sudo docker <restart/stop/start/status> <nameOfDockerInstance/PID/partOfIDifUnique>
# Create the first docker instance: Hello, world! It gets the setting from docker.hub
sudo docker run hello-world
# run: build and deploy an instance
# by default, docker saves everything in /var/lib/docker
# Execute commands in an already running docker instance. You can execute a terminal or a command.
sudo docker run -it <image> <echo lala / bf bash>
# image: for instance, debian
# <echo lala or bf bash>: command echo lala. Or terminal in bash