it's easiest to go to dockerhub first with a browser and create a repo and after you have created tag your image.
create the image
docker build -t name .
check that it exists
docker images
tag it
docker tag SOURCE_IMAGE[:TAG] TARGET_IMAGE[:TAG]
use the docker push with your repo name
ref
https://docs.docker.com/reference/cli/docker/image/push/