Home > Enterprise >  How to publish my c# console programm in docker hub with specific image name?
How to publish my c# console programm in docker hub with specific image name?

Time:10-30

I created c# console application (.net 5). Also added docker support, so dockerfile included in my project. It is possible to launch console with docker from IDE button. But how to create named image from this and publish to docker hub? My OS is Windows.

CodePudding user response:

Ensure you're logged in to Docker Hub:

docker login -u <username> -p <password>

Build and tag your Docker image:

docker build -t <docker-hub-username>/<repo-name>:<tag> -f <solution-dir>/<project-dir>/Dockerfile <solution-dir>

Push your image to Docker Hub:

docker push <docker-hub-username>/<repo-name>:<tag>

  • Related