@@ -38,6 +38,18 @@ Let's dissect this a bit:
38
38
- we set ` --debug ` to get additional log output (optional)
39
39
- we set the short description for the Dockerhub repo with ` --short <string> ` (optional)
40
40
41
+ ** Alternatively all params can also get set with environment variables:**
42
+
43
+ ```
44
+ $ docker run --rm -t \
45
+ -v $(pwd):/myvol \
46
+ -e DOCKER_USER='my-user' -e DOCKER_PASS='my-pass' \
47
+ -e PUSHRM_PROVIDER=dockerhub -e PUSHRM_FILE=/myvol/README.md \
48
+ -e PUSHRM_SHORT='my short description' \
49
+ -e PUSHRM_TARGET=docker.io/my-user/my-repo -e PUSHRM_DEBUG=1 \
50
+ chko/docker-pushrm:1
51
+ ```
52
+
41
53
#### Push a README file to a Harbor v2 registry server
42
54
43
55
Use the ` --provider harbor2 ` flag:
@@ -55,8 +67,9 @@ chko/docker-pushrm:1 --file /myvol/README.md \
55
67
56
68
#### Push a README file to Quay.io or a Quay registry server
57
69
70
+
58
71
- use the ` --provider quay ` flag
59
- - use env var ` APIKEY__<SERVER>_<DOMAIN> ` for apikey credentials
72
+ - use env var ` APIKEY__<SERVER>_<DOMAIN> ` or ` DOCKER_APIKEY ` for apikey credentials
60
73
61
74
```
62
75
$ ls
@@ -69,5 +82,26 @@ chko/docker-pushrm:1 --file /myvol/README.md \
69
82
--provider quay --debug quay.io/my-user/my-repo
70
83
```
71
84
85
+ ### env vars
86
+
87
+ | env var | example value | description
88
+ | --------------------------- | ------------------------------ | ----------------------------------------
89
+ | ` DOCKER_USER ` | ` my-user ` | login username
90
+ | ` DOCKER_PASS ` | ` my-password ` | login password
91
+ | ` DOCKER_APIKEY ` | ` my-quay-api-key ` | quay api key
92
+ | ` APIKEY__<SERVER>_<DOMAIN> ` | ` my-quay-api-key ` | quay api key (alternative)
93
+ | ` PUSHRM_PROVIDER ` | ` dockerhub ` , ` quay ` , ` harbor2 ` | repo provider type
94
+ | ` PUSHRM_SHORT ` | ` my short description ` | set/update repo short description
95
+ | ` PUSHRM_FILE ` | ` /myvol/README.md ` | path to the README file
96
+ | ` PUSHRM_DEBUG ` | ` 1 ` | enable verbose output
97
+ | ` PUSHRM_CONFIG ` | ` /myvol/.docker/config.json ` | Docker config file (for credentials)
98
+ | ` PUSHRM_TARGET ` | ` docker.io/my-user/my-repo ` | container repo ref
99
+
100
+ Presedence:
101
+ - Params specified with flags take precedence over env vars.
102
+ - Login env vars take precedence over credentials from a Docker config file
103
+
104
+
105
+
72
106
73
107
0 commit comments