My Docker Setup
A simple and repeatable way to build your personal cybersecurity tools environment using Docker.
My Docker Setup
Step 1: Install Docker
Run the following commands one by one:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Update the system
sudo apt update
# Install required packages
sudo apt install -y apt-transport-https ca-certificates curl software-properties-common
# Add Docker’s official GPG key
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker.gpg
# Add Docker’s repository
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
# Update packages again
sudo apt update
# Install Docker
sudo apt install -y docker-ce
# Enable and start Docker
sudo systemctl enable docker
sudo systemctl start docker
Test Docker
1
sudo docker run hello-world
Step 3: Build the Docker Image
In the same folder as your Dockerfile, run:
1
sudo docker build -t my-sec-env .
This will create a Docker image named my-sec-env with all your tools pre-installed.
Step 4: Run Your Security Tools Container
Start your container:
1
2
sudo docker run -it my-sec-env
You’re now inside your own security lab! Use tools like:
nmap pwntools curl, ping, htop, and more!
To exit, just type:
1
exit
This post is licensed under CC BY 4.0 by the author.