Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/christian-korneck/docker-pushrm
"Docker Push Readme" - a Docker CLI plugin to update container repo docs
https://github.com/christian-korneck/docker-pushrm
container-registry containers docker docker-cli-plugin dockerhub harbor podman quay
Last synced: 2 months ago
JSON representation
"Docker Push Readme" - a Docker CLI plugin to update container repo docs
- Host: GitHub
- URL: https://github.com/christian-korneck/docker-pushrm
- Owner: christian-korneck
- License: mit
- Created: 2020-05-27T01:02:11.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-06-10T21:42:09.000Z (4 months ago)
- Last Synced: 2024-06-19T00:32:53.216Z (4 months ago)
- Topics: container-registry, containers, docker, docker-cli-plugin, dockerhub, harbor, podman, quay
- Language: Go
- Homepage:
- Size: 332 KB
- Stars: 133
- Watchers: 5
- Forks: 4
- Open Issues: 5
-
Metadata Files:
- Readme: README-containers.md
- License: LICENSE
Awesome Lists containing this project
- awesome-cli-apps - docker-pushrm - Push a readme to container registries. (Development / Docker)
- awesome-ccamel - christian-korneck/docker-pushrm - "Docker Push Readme" - a Docker CLI plugin to update container repo docs (Go)
- jimsghstars - christian-korneck/docker-pushrm - "Docker Push Readme" - a Docker CLI plugin to update container repo docs (Go)
- fucking-awesome-cli-apps - docker-pushrm - Push a readme to container registries. (Development / Docker)
- awesome-docker - docker pushrm - A Docker CLI plugin that lets you push the README.md file from the current directory to Docker Hub. Also supports Quay and Harbor. By [@christian-korneck](https://github.com/christian-korneck) (Container Operations / User Interface)
README
# Docker Push Readme
This is a container image of [`docker-pushrm`](https://github.com/christian-korneck/docker-pushrm), a tool that lets you update the README of your container repo on Dockerhub, Quay or Harbor from a local markdown file.
![hello moon](https://raw.githubusercontent.com/christian-korneck/docker-pushrm/master/assets/container_registries.png)
## About this tool
Check the [full docs](https://github.com/christian-korneck/docker-pushrm/blob/master/README.md) for an introduction.
## How to use this container image
### Examples
#### Push a README file to Dockerhub
```
$ ls
README.md$ docker run --rm -t \
-v $(pwd):/myvol \
-e DOCKER_USER='my-user' -e DOCKER_PASS='my-pass' \
chko/docker-pushrm:1 --file /myvol/README.md \
--short "My short description" --debug my-user/my-repo...
DEBU content validation successfull, readme successfully pushed to repo server
```Let's dissect this a bit:
- we pin to the major version (`v1`) of this image (`chko/docker-pushrm:v1`). Recommended for most use cases.
- the README file is in the current working directory on the host. We map this dir as volume to the container (mounted at `/myvol`)
- we tell *docker-pushrm* where to find the README file with `--file `
- our destination repo on Dockerhub is `my-user/my-repo`
- we pass the credentials for the repo as environment variables to the container (`DOCKER_USER` and `DOCKER_PASS`)
- we set `--debug` to get additional log output (optional)
- we set the short description for the Dockerhub repo with `--short ` (optional)**Alternatively all params can also get set with environment variables:**
```
$ docker run --rm -t \
-v $(pwd):/myvol \
-e DOCKER_USER='my-user' -e DOCKER_PASS='my-pass' \
-e PUSHRM_PROVIDER=dockerhub -e PUSHRM_FILE=/myvol/README.md \
-e PUSHRM_SHORT='my short description' \
-e PUSHRM_TARGET=docker.io/my-user/my-repo -e PUSHRM_DEBUG=1 \
chko/docker-pushrm:1
```#### Push a README file to a Harbor v2 registry server
Use the `--provider harbor2` flag:
```
$ ls
README.md$ docker run --rm -t \
-v $(pwd):/myvol \
-e DOCKER_USER='my-user' -e DOCKER_PASS='my-pass' \
chko/docker-pushrm:1 --file /myvol/README.md \
--provider harbor2 --debug demo.goharbor.io/my-project/my-repo
```#### Push a README file to Quay.io or a Quay registry server
- use the `--provider quay` flag
- use env var `APIKEY___` or `DOCKER_APIKEY` for apikey credentials```
$ ls
README.md$ docker run --rm -t \
-v $(pwd):/myvol \
-e APIKEY__QUAY_IO='my-apikey' \
chko/docker-pushrm:1 --file /myvol/README.md \
--provider quay --debug quay.io/my-user/my-repo
```### env vars
| env var | example value | description
| --------------------------- | ------------------------------ | ----------------------------------------
| `DOCKER_USER` | `my-user` | login username
| `DOCKER_PASS` | `my-password` | login password
| `DOCKER_APIKEY` | `my-quay-api-key` | quay api key
| `APIKEY___` | `my-quay-api-key` | quay api key (alternative)
| `PUSHRM_PROVIDER` | `dockerhub`, `quay`, `harbor2` | repo provider type
| `PUSHRM_SHORT` | `my short description` | set/update repo short description
| `PUSHRM_FILE` | `/myvol/README.md` | path to the README file
| `PUSHRM_DEBUG` | `1` | enable verbose output
| `PUSHRM_CONFIG` | `/myvol/.docker/config.json` | Docker config file (for credentials)
| `PUSHRM_TARGET` | `docker.io/my-user/my-repo` | container repo refPresedence:
- Params specified with flags take precedence over env vars.
- Login env vars take precedence over credentials from a Docker config file