Debian doesn’t use sudo so make sure you are root user with su before running this command. Also, this command uses apt instead of apt-get.

apt update && apt install curl -y && curl -sSL https://get.docker.com/ | sh