I am trying to push a docker image to my private repo on docker hub. However, I do see that there is an "Information" section on the Docker Hub which I want to update with useful information about my image. I am wondering if I can push a README.md file and Docker Hub can parse this file and update the "Information" section with this. I am not sure if I should embed the README.md in my image for this to work?
To push an image to Docker Hub, you must first name your local image using your Docker Hub username and the repository name that you created through Docker Hub on the web. You can add multiple images to a repository by adding a specific :<tag> to them (for example docs/base:testing ).
When docker-compose builds an image, it will have name. Just docker tag and docker push those images like any other image. @Mamen yes, in the case to build and run, just run the Docker Compose. The images will be pulled automatically.
Docker Hub will try to parse your Readme.md iff you're doing an " Automated Build ." For manual builds (where you push your own image), Docker Hub does not peek inside your image source code repository and has no way to know about your Readme. You'll need to manually add your Readme text to the Information section
Push the image to the Docker hub using the push command. That’s all. Now the image is uploaded to the docker hub. You can check out the image in your profile URL.
Then you can push the Docker image to the Docker hub or any image repository manager (AWS, GCP, and Azure). From the Docker hub repository, you can run a container for the application anywhere in the cloud. 1. Create a Dockerfile for the application. 2. Build the application as an Image using Dockerfile. 3. Push the image to Docker Hub.
docker-pushrm is a Docker CLI plugin that adds a new docker pushrm (speak: push readme) command to Docker. When it's installed you can push a README to Docker Hub, Quay or Harbor with: It uses the the logins from Docker's credentials store, so it "just works" for registries that you're already logged into. I use it both interactively and for CI.
Docker Hub will try to parse your Readme.md
iff you're doing an "Automated Build." For manual builds (where you push your own image), Docker Hub does not peek inside your image source code repository and has no way to know about your Readme. You'll need to manually add your Readme text to the Information section
dockerhub-description GitHub Action can update the Docker Hub description from a README.md file.
- name: Docker Hub Description uses: peter-evans/dockerhub-description@v2 env: DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }} DOCKERHUB_REPOSITORY: peterevans/dockerhub-description
You can also use it independently of GitHub Actions in other CI tools.
docker run -v $PWD:/workspace \ -e DOCKERHUB_USERNAME='user1' \ -e DOCKERHUB_PASSWORD='xxxxx' \ -e DOCKERHUB_REPOSITORY='my-docker-image' \ -e README_FILEPATH='/workspace/README.md' \ peterevans/dockerhub-description:2.1.0
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With