Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to push a docker image with README file to docker hub?

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?

like image 747
sunsin1985 Avatar asked Mar 18 '15 22:03

sunsin1985


People also ask

How do I push my image to Docker Hub?

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 ).

Can I push docker Compose to Docker Hub?

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.

How does Docker Hub know about my README?

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

How to upload an image to Docker Hub?

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.

How do I run an application from a docker image?

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.

What is +Docker-pushrm used for?

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.


2 Answers

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

like image 86
Andy Avatar answered Oct 04 '22 15:10

Andy


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 
like image 35
peterevans Avatar answered Oct 04 '22 16:10

peterevans