Docker Installation Script Usage Tutorial#
One-Click Script#
After connecting to the VPS, simply run the script to install Docker:
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
-
Some systems may not have the sudo command (if the user you are currently logged in as is root, you can remove sudo from the beginning of the command)
-
This one-click script is published and maintained by Docker official, supporting common Linux distributions such as CentOS, Ubuntu, Debian, Fedora, etc.
Official Manual Installation Tutorial#
Docker Compose Installation Tutorial#
The latest version of Docker now comes with Compose included. After installing Docker, you can execute docker compose version to verify.
Install as a Plugin#
- Ubuntu and Debian
sudo apt-get update
sudo apt-get install docker-compose-plugin
- CentOS
sudo yum update
sudo yum install docker-compose-plugin
Successful Installation Verification#
docker compose version
Standalone Installation#
-
The docker compose command installed as a plugin does not have a -
-
The docker-compose command installed standalone does have a -
Installation in China#
One-Click Installation Script#
CDN (Recommended)
bash <(curl -sSL https://linuxmirrors.cn/docker.sh)
Gitee#
bash <(curl -sSL https://gitee.com/SuperManito/LinuxMirrors/raw/main/DockerInstallation.sh)
Official Documentation
https://linuxmirrors.cn/other/