Docker plugin push to local registry

Is it possible currently to push a docker v2 plugin to a local registry.
I have a local registry running at localhost:5000, but the push command always results into pushing the plugin to DockerHub.

I followed the following doc, to deploy a local registry server and push a container image to it. However I am unable to replicate the steps to push a plugin.

Is it supported with the latest registry? I am using registry:2 image.

What are the steps you are using to push?

They should be something similar to:

docker build -t image-name:tag-name .
docker tag image-name:tag-name localhost:5000/image-name:tag-name
docker push localhost:5000/image-name:tag-name

@issjohnm Thanks for your reply.
I am trying to push a plugin and not an image. The plugin images are not listed under
docker images
But are only visible with
docker plugin ls
If I follow your commands when I try to tag the image in my local registry I get the following error

$ docker tag adityadani/plugin:latest localhost:5000/adityadani/plugin:latest Error response from daemon: No such image: adityadani/plugin:latest

Here is the command that I am using to push a plugin

$ docker plugin push localhost:5000/adityadani/plugin
Error response from daemon: plugin "localhost:5000/adityadani/plugin:latest" not found

I believe this error is because the plugin is not tagged for your registry like you would for images. There doesn’t seem to be a way within the docker plugin command set to tag them like an image, but perhaps you can just tag them like they were an image using the ID from docker plugin ls.

That said, this may be a feature not yet implemented for both plugins and the private registry.