This is a quick hack to push README.md files to Docker hub.
Simply build the image using docker build -t readme-to-hub .
and run it with all needed parameter:
docker run --rm \
-v /path/to/readme.md:/data/README.md \
-e DOCKERHUB_USERNAME=myhubuser \
-e DOCKERHUB_PASSWORD=myhubpassword \
-e DOCKERHUB_REPO_PREFIX=myorga \
-e DOCKERHUB_REPO_NAME=myrepo \
readme-to-hub
That's it.
This image uses environment variables for configuration.
Available variables | Default value | Description |
---|---|---|
DOCKERHUB_USERNAME |
no default | The Username (not mail address) used to authenticate |
DOCKERHUB_PASSWORD |
no default | Password of the DOCKERHUB_USERNAME -user |
DOCKERHUB_REPO_PREFIX |
$DOCKERHUB_USERNAME |
Organization or username for the repository |
DOCKERHUB_REPO_NAME |
no default | Name of the repository you want to push to |
README_PATH |
/data/README.md |
Path to the README.me to push |
SHORT_DESCRIPTION |
no default | Short description for the Dockerhub repo |
By default, if the README_PATH
environment variable is not set, this image always pushes the file
/data/README.md
as full description to Docker Hub.
For GitHub repositories you can use -v /path/to/repository:/data/
.
If your description is not named README.md
mount the file directory using -v /path/to/description.md:/data/README.md
.
Notice that the filename is case sensitive. If your readme is called readme.md
you have to mount the file directly, not the directory
The user you use to push the README.md need to be admin of the repository.
To update your setup simply pull the newest image version from docker hub and run it.
We provide information about features we remove in future.
DOCKERHUB_REPO
- is renamed toDOCKERHUB_REPO_NAME
to be not mixed up withDOCKERHUB_REPO_PREFIX
View license information for the software contained in this image.
Everything in this repository is published under GPL-3.
If you have any problems with or questions about this image, please contact us through a GitHub issue.
You are invited to contribute new features, fixes, or updates, large or small; I'm always thrilled to receive pull requests.
General guidelines for development can be found at https://shivering-isles.com/contribute