Do not use registry:latest
! This image points to the old v1 registry. That Python project is no longer being developed. The new v2 registry is written in Go and is actively maintained. When people refer to a "private registry" they are referring to the v2 registry, not the v1 registry!
docker run -d -p 5000:5000 --name="registry" registry:2
The above command runs the newest version of the registry, which can be found in the Docker Distribution project.
For more examples of image management features, such as tagging, pulling, or pushing, see the section on managing images.