Publishing directly to Docker Hub #359
pfedotovsky
started this conversation in
General
Replies: 1 comment 1 reply
-
Thanks for this feedback @pfedotovsky - let me make sure I understand the takeaway here.
Is there anything else you'd like to see? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I want to share my experience with publishing directly to the Docker Hub. I hope it'll be helpful for someone and used to update the documentation: https://github.com/dotnet/sdk-container-builds/blob/main/docs/RegistryAuthentication.md.
I'm using macOS Ventura with an Apple M1 chip.
First, I've found that they're at least three Docker Hub registry URLs which is confusing:
To authenticate with registries, I used
docker login <registry-name>,
i.e.,docker login registry.hub.docker.com
To publish, I used the command:
dotnet publish --os linux --arch x64 -c Release /p:ContainerRegistry=<registry-name> /p:ContainerImageName=<dockerhub-username>/<repository-name>
Example:
dotnet publish --os linux --arch x64 -c Release /p:ContainerRegistry=registry.hub.docker.com /p:ContainerImageName=pfedotovsky/dotnetru-appservice
Now, the registry.hub.docker.com and registry-1.docker.io are working correctly, while with docker.io, the dotnet publish command executes successfully, but no package is found on Docker Hub.
Beta Was this translation helpful? Give feedback.
All reactions