table of Contents
2. Docker and docker-compose installation
Three. Docker configures domestic mirror sites
1. Docker uninstall
1. Uninstall
sudo apt purge --autoremove docker.io
2. Determine whether the uninstallation is successful
docker --version
2. Docker and docker-compose installation
View ubuntu version
lsb_release -a
1. First use the command sudo apt update to update the installation package, mine has been updated, so no need to update
sudo apt update
2. Use the command sudo apt install docker.io
sudo apt install docker.io
3. View the docker version
4. Install pip
apt install python3-pip
5. Install docker-compose
apt install docker-compose
6. View Docker startup, shutdown, restart, view docker startup status, refresh docker configuration
刷新配置
sudo systemctl daemon-reload
重新启动Docker服务
sudo systemctl restart docker
查看docker服务是否启动:
sudo systemctl status docker
停止docker:
sudo systemctl stop docker
Three. Docker configures domestic mirror sites
Why do we need to set it? If it is not set, then the image will be downloaded from a foreign docker. This speed is very slow, so we have to set the docker image to a domestic site
The process is as follows: After docker is installed in ubuntu using the above method, a docker folder will be generated under /etc, and a key.json file will appear in this folder. We don’t care about this file, we are in /etc/ Create a daemon.json file in the docker folder. The content of this daemon.json file is as follows
{
"registry-mirrors": ["https://docker.mirrors.ustc.edu.cn"]
}
Then load this configuration and execute the following command
systemctl daemon-reload
Then start docker
systemctl restart docker
At this point, the installation of Docker is successful
4. Download vulhub
1. Installation package download address (faster)
https://github.com/vulhub/vulhub/archive/master.zip
Or directly execute the command to download (it is faster if the domestic source is configured)
git clone https://github.com/vulhub/vulhub.git
2. Decompress the downloaded file and place it in a random directory on ubuntu
3. Enter a random vulnerability environment, execute docker-cmpose up -d, the following docker installation is completed