Question on Docker registry ->Local registry to store images

i basically executed the below command : docker run -d -p 5000:5000 --restart=always --name my-registry registry:2

And it basically created a container and this is a registry container . then i tag the image and push the image to the registry.

So basically this registry container will have all the images that are pushed within the registry container itself correct ?

Yes it will - but you should map a volume so that data is retained.