Install Docker Engine and the Compose plugin on Ubuntu from Docker's official apt repository, then run docker without sudo.
Remove old or conflicting packages (docker.io, podman-docker, containerd)
Quick option for throwaway VMs: curl -fsSL https://get.docker.com | sh. On macOS and Windows install Docker Desktop (or OrbStack / Colima on macOS) instead.
The docker group grants root-equivalent access. On shared servers, consider rootless mode (dockerd-rootless-setuptool.sh install).