Skip to content

genzouw/docker_hub_cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 genzouw@gmail.com or tweet to @genzouw on Twitter.

Author Information

genzouw

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published