This is docker image based on alpine
- DOCKERHUB_USERNAME user who has access to write to repository
- DOCKERHUB_PASSWORD user password
- DOCKERHUB_REPO should be in format
user/repository
ex aemdesign/dockerhub-description - PATH TO README is optional with default
/data/README.md
, you need to mount directory with readme into the/data/
volume
To upload README.md in current directory run following:
docker run --rm \
-v $(pwd):/data/ \
aemdesign/dockerhub-description \
"$DOCKERHUB_USERNAME" \
"$DOCKERHUB_PASSWORD" \
"$DOCKERHUB_REPO"
If you need to specify location of readme file run:
docker run --rm \
-v $(pwd):/data/ \
aemdesign/dockerhub-description \
"$DOCKERHUB_USERNAME" \
"$DOCKERHUB_PASSWORD" \
"$DOCKERHUB_REPO" \
"/path/to/parent/with/readme/"
`docker run -it --rm -v $(pwd):/data --entrypoint="" aemdesign/dockerhub-description /bin/sh`
This image uses environment variables for configuration.
Available variables | Default value | Description |
---|---|---|
USERNAME |
no default | Username for admin of the repo |
PASSWORD |
no default | User password |
REPO |
no default | Full name of repo Organisation/Name |
README |
/data/README.md |
Readme filename if diffrent |
API_URL |
https://hub.docker.com/v2 |
URL for dockerhub if diffrent |
By default, if the README
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/
or if in same directory -v $(pwd):/data/
.
If your description is not named README.md
mount the file directory using -v /path/to/description.md:/data/README.md
or pass it as README
parameter.