Docker and Docker-Compose simple construction and basic settings
1. Build Docker
1. The first step is of course to read the official documents
2. Then I found a lot of tutorials for manual construction (and then Xiaobai built it like this), and then found that there is a key to build the script at the end
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
3. Finally, start Docker and set it to restart automatically
systemctl start docker
systemctl enable docker
4. Finally, check whether the operation is successful
docker stats
docker -v
If the flashing list appears, it means the operation is successful
2. Build Docker-Compose ( official document )
1. Go to the docker-compose release page of gitthub , copy the corresponding device download link, then replace the link below and execute the command
For example:
sudo curl -L "https://github.com/docker/compose/releases/download/v2.2.2/docker-compose-linux-x86_64" -o /usr/local/bin/docker-compose
2. Apply executable permissions to the binary
sudo chmod +x /usr/local/bin/docker-compose
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
3. Final test installation
docker-compose --version
This article was originally created by " Cheng Ge Blog " and complies with the CC 4.0 BY-SA copyright agreement. For reprinting, please attach the original source link and this statement.
Original link: Docker and Docker-Compose simple construction and basic settings - Cheng Ge Blog