Sign inSign up

genzouw/docker_hub_cli

By genzouw

•Updated over 6 years ago

you can save and manage the Docker Hub API token and create a repository from the command line.

Image
0

592

genzouw/docker_hub_cli repository overview

⁠docker_hub_cli

Docker Cloud build status Docker Pulls Docker Cloud Automated build

dockeri.co

⁠Description

Using this container, you can save and manage the Docker Hub⁠ API token and create a repository from the command line.

Please contact me anytime if you have a problem or request! My information is posted at the bottom of this document.

⁠Requirements

⁠Installation

You do not need to install !

⁠Usage

authenticate by running with DOCKER_HUB_USERNAME and DOCKER_HUB_PASSWORD ENVIRONMENT VARIABLES:

# Authentication settings to use API TOKEN
$ docker run -it \
  -e DOCKER_HUB_USERNAME \
  -e DOCKER_HUB_PASSWORD \
  --name docker_hub_cli-config genzouw/docker_hub_cli login

# IF environment variables is undefined, you use a follow command.
$ docker run -it \
  -e DOCKER_HUB_USERNAME=your_name \
  -e DOCKER_HUB_PASSWORD=your_password \
  --name docker_hub_cli-config genzouw/docker_hub_cli login

Once you authenticate successfully, credentials are preserved in the volume of the docker_hub_cli-config container.

To create Docker Hub repository using these credentials, run the container with --volumes-from:

$ docker run --rm --volumes-from docker_hub_cli-config genzouw/docker_hub_api create_repository myrepo
https://hub.docker.com/repository/docker/genzouw/myrepo

I recommend that you set the following alias in ~/.*rc.

$ alias docker_hub='docker run --rm --volumes-from docker_hub_cli-config genzouw/docker_hub_api'

⁠License

This software is released under the MIT License, see LICENSE.

⁠Contribution

⁠Help

Got a question ?

File a Github issue⁠, send an email to [email protected]⁠ or tweet to @genzouw⁠ on Twitter.

⁠Author Information

genzouw⁠

Tag summary

Content type

Image

Digest

Size

43.7 MB

Last updated

over 6 years ago

docker pull genzouw/docker_hub_cli