Start with a supported guest
Choose a supported Linux image, update it, create controlled admin access and install Docker using current upstream guidance rather than a stale copy/paste installer. Docker’s Ubuntu documentation also calls out conflicting distro packages that should be removed before installing the official engine packages.