mirror of
https://github.com/genuinetools/reg.git
synced 2024-09-28 11:46:20 -04:00
allows people to setup default registry in .bashrc and avoid typing it every time
This commit is contained in:
parent
dfb6ef23f5
commit
dd16b5bfef
2 changed files with 8 additions and 4 deletions
|
@ -59,11 +59,14 @@ GLOBAL OPTIONS:
|
||||||
--force-non-ssl, -f force allow use of non-ssl
|
--force-non-ssl, -f force allow use of non-ssl
|
||||||
--username value, -u value username for the registry
|
--username value, -u value username for the registry
|
||||||
--password value, -p value password for the registry
|
--password value, -p value password for the registry
|
||||||
--registry value, -r value URL to the private registry (ex. r.j3ss.co) (default: "https://registry-1.docker.io")
|
--registry value, -r value URL to the private registry (ex. r.j3ss.co) (default: "https://registry-1.docker.io") [$REG_REGISTRY]
|
||||||
--help, -h show help
|
--help, -h show help
|
||||||
--version, -v print the version
|
--version, -v print the version
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Note that the `--registry` can be set by an environment variable `REG_REGISTRY`, so you can set this in your shell login scripts.
|
||||||
|
Specifying the registry on the command-line will override an environment variable setting.
|
||||||
|
|
||||||
## Auth
|
## Auth
|
||||||
|
|
||||||
`reg` will automatically try to parse your docker config credentials, but if
|
`reg` will automatically try to parse your docker config credentials, but if
|
||||||
|
|
7
main.go
7
main.go
|
@ -48,9 +48,10 @@ func main() {
|
||||||
Usage: "password for the registry",
|
Usage: "password for the registry",
|
||||||
},
|
},
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "registry, r",
|
Name: "registry, r",
|
||||||
Usage: "URL to the private registry (ex. r.j3ss.co)",
|
Usage: "URL to the private registry (ex. r.j3ss.co)",
|
||||||
Value: repoutils.DefaultDockerRegistry,
|
Value: repoutils.DefaultDockerRegistry,
|
||||||
|
EnvVar: "REG_REGISTRY",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue