Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
amalfra committed Jun 2, 2018
1 parent 6ee7a54 commit 5187384
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,16 @@ pip3 install docker-hub
##### 1. Authenticate with Docker Hub
If you are already loggedin using `docker login` command, then the token in docker engine config will be used. Otherwise you can choose to proceed without authenticating which will query docker hub without token and list only public resources. To authenticate for viewing private resources do `docker-hub login` command; this will save auth token in docker-hub's config file so that you don't need to do login everytime.

If you want to authenticate for only current command(to not presist auth tokens in config) make use of the following env variables:
* DOCKER_HUB_USERNAME - Your Docker Hub username
* DOCKER_HUB_PASSWORD - Your Docker Hub password
Pass the mentioned envs with your command and docker-hub will try to do authentication without prompting for credentials.

eg:
```sh
DOCKER_HUB_USERNAME=hello DOCKER_HUB_PASSWORD=world docker-hub repos --orgname docker
```

##### 2. Querying an organization for repositories
To query repositories in an organization use `repos` argument. The organization to query can be passed as `--orgname` or `-o` parameter.
eg: Get repos in organization named "docker"
Expand Down

0 comments on commit 5187384

Please sign in to comment.