I'm using Travis CI for building docker images from Dockerfiles and then pushing them to the Docker Hub on success.
I've created an MD file describing the image and how to use it. I want to have the same description on the Docker Hub in the full description section.
As I may update the description in the future, I want to have Travis CI automatically update the description based on the MD file in the repository with the new image.
Anyone knows how to do this?
Your containers are now set up to automatically update whenever you push a new Docker image to your image repository, or when an external maintainer updates an image you're watching.
# Update your tags manually as needed When a new version comes out, update the tag in your docker-compose. yml , docker-compose pull , and then restart the container ( docker-compose down && docker-compose up -d ). This is simple, and robust, and means nothing will update without you knowing.
Docker Hub can automatically build images from source code in an external repository and automatically push the built image to your Docker repositories. When you set up automated builds (also called autobuilds), you create a list of branches and tags that you want to build into Docker images.
I have a GitHub Action to do this. https://github.com/peter-evans/dockerhub-description
- name: Docker Hub Description
uses: peter-evans/[email protected]
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
Note: This does not work if you are using 2 Factor Authentication (2FA) and/or using Personal Access Tokens to authenticate to Docker Hub. You must use your actual Docker Hub password. See issue reported here: https://github.com/docker/hub-feedback/issues/1927
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