Installing Docker Engine and Docker Compose
Use Docker’s repository for the current supported distribution rather than an unreviewed convenience script. Remove conflicting packages, add the repository and signing key according to the current Docker documentation, then install Docker Engine and the Compose plugin.
Verify the daemon and versions:
systemctl enable --now docker
docker version
docker compose version
docker run --rm hello-world
Membership in the docker group is effectively root access. Do not expose the Docker API socket publicly. Store persistent application data in documented volumes, limit published ports with the guest firewall, pin application versions, and back up both compose definitions and state.