Install Docker Tutorial (Official Script on Debian, Ubuntu, CentOS)
This tutorial shows how to install Docker Engine on a Linux VPS with xyz.sh/docker. The install is performed by the official get.docker.com script; xyz.sh only previews and confirms it.
$ curl -fsSL xyz.sh/docker | bash
Details · xyz.sh/docker · Last updated:
Prerequisites
You need a VPS running Debian, Ubuntu, CentOS, Rocky, or AlmaLinux, and root access.
Docker does not recommend relying on the convenience script in production. For a manual, distro-specific install, see https://docs.docker.com/engine/install/.
Steps
Optional: review the source with curl -fsSL xyz.sh/docker.sh, or open the script page in a browser.
As root, run: curl -fsSL xyz.sh/docker | bash
The wrapper downloads the official installer, prints the first 20 lines and a SHA256, then runs it only after confirmation. Use bash -s -- --dry-run to preview official steps, or --mirror Aliyun for a mirror the official script supports.
If you used sudo, you are asked whether to add SUDO_USER to the docker group; it is not automatic. A new login is required afterwards.
How to verify
After install, run docker --version. Optionally run docker run --rm hello-world (this pulls Docker's official test image).
How to uninstall
This wrapper has no uninstall command. To remove Docker Engine, follow Docker's official documentation and use your distro's package manager to remove docker-ce and related packages. Decide separately whether to delete the repository the official script added.