Skip to content

Commit 9c0b7c4

Browse files
author
Matthew Fisher
committed
docs(using-workflow): clarify what username and password reflect
some users were getting confused what exactly should be in the username/password fields. Clarifying that these are identical to what's used in `docker login` should help clear up the air.
1 parent c255be3 commit 9c0b7c4

1 file changed

Lines changed: 15 additions & 8 deletions

File tree

src/using-workflow/using-docker-images.md

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Use `deis create` to create an application on the [controller][].
3737
Creating application... done, created example-go
3838

3939
!!! note
40-
For all commands except for `deis create`, the `deis` client uses the name of the current directory
40+
For all commands except for `deis create`, the `deis` client uses the name of the current directory
4141
as the app name if you don't specify it explicitly with `--app`.
4242

4343

@@ -60,26 +60,33 @@ running that process.
6060

6161
## Private Registry
6262

63-
To deploy Docker images from a private registry or even from a private repository within a public registry, take the following steps:
63+
To deploy Docker images from a private registry or from a private repository, use `deis registry`
64+
to attach credentials to your application. These credentials are the same as you'd use when running
65+
`docker login` at your private registry.
6466

65-
* Gather the username and password for the registry, such as a [Quay.io Robot Accounts][] or [GCR.io Long Lived Token][]
67+
To deploy private Docker images, take the following steps:
68+
69+
* Gather the username and password for the registry, such as a [Quay.io Robot Account][] or a [GCR.io Long Lived Token][]
6670
* Run `deis registry:set username=<the-user> password=<secret> -a <application-name>`
6771
* Now perform `deis pull` as normal, against an image in the private registry
6872

69-
When using a [GCR.io Long Lived Token][] the JSON blob will have to be compacted first using a tool like [jq][]
70-
and then used in the password field in `deis registry:set`.
73+
When using a [GCR.io Long Lived Token][], the JSON blob will have to be compacted first using a
74+
tool like [jq][] and then used in the password field in `deis registry:set`. For the username, use
75+
`_json_key`. For example:
7176

72-
`cat serviceaccount.json | jq -c .` will compact the JSON blob using [jq][].
77+
```
78+
deis registry:set username=_json_key password="$(cat google_cloud_cred.json | jq -c .)"
79+
```
7380

7481
**NOTE:**
75-
Currently [GCR.io][] and [ECR][] in short lived auth token mode are not supported
82+
Currently [GCR.io][] and [ECR][] in short lived auth token mode are not supported.
7683

7784
[container]: ../reference-guide/terms.md#container
7885
[controller]: ../understanding-workflow/components.md#controller
7986
[Docker Image]: https://docs.docker.com/introduction/understanding-docker/
8087
[DockerHub]: https://registry.hub.docker.com/
8188
[CMD instruction]: https://docs.docker.com/reference/builder/#cmd
82-
[Quay.io Robot Accounts]: https://docs.quay.io/glossary/robot-accounts.html
89+
[Quay.io Robot Account]: https://docs.quay.io/glossary/robot-accounts.html
8390
[GCR.io Long Lived Token]: https://cloud.google.com/container-registry/docs/auth#using_a_json_key_file
8491
[jq]: https://stedolan.github.io/jq/
8592
[GCR.io]: https://gcr.io

0 commit comments

Comments
 (0)