Adding images to your self hosted repository requires to first tag them. This is essentially like setting a remote branch to a local branch in git.
docker tag my-local-image registry.yourdomain.local/my-image:latest
Then you can push the image to the self hosted registry:
docker push registry.yourdomain.local/my-image:latest
Example docker-compose file:
services:
docker-registry:
container_name: docker-registry
image: registry:2
restart: unless-stopped
volumes:
- ./registry-data:/var/lib/registry
environment:
- REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY=/var/lib/registry
volumes:
registry-data: