How to install Docker on Debian without adding repositories?

docker.io is the open source version of docker/containerd in the Debian sid repository.

For just docker: sudo apt-get install docker.io

If you need docker-compose, you can get it from the unstable repository or install it from git, it's just a few python scripts so it's easy to install from source.

docker-compose https://docs.linuxserver.io/general/docker-compose

Source: https://packages.debian.org/source/sid/docker.io
Tested on Ubuntu 20.04 amd64 and Ubuntu 21.10 arm64