0.6.5 • Published 3 years ago

docmir v0.6.5

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

docmir

A CLI application to create and sync images from dockerhub to provider of choice. Currently, only supports (AWS ECR)

oclif Version Downloads/week License

Usage

$ npm install -g docmir
$ docmir COMMAND
running command...
$ docmir (-v|--version|version)
docmir/0.6.5 darwin-x64 node-v16.2.0
$ docmir --help [COMMAND]
USAGE
  $ docmir COMMAND
...

Commands

docmir auth [PROVIDER]

Set Docker user and password, and validate credentials with provider

USAGE
  $ docmir auth [PROVIDER]

ARGUMENTS
  PROVIDER  (ecr|docker) [default: docker] The registry provider

OPTIONS
  -h, --help                       show CLI help
  -p, --userPassword=userPassword  docker password
  -r, --repository=repository      Repository url
  -u, --userName=userName          docker username

See code: src/commands/auth.ts

docmir create-repo PROVIDER REPONAME

Create a repo for the provider

USAGE
  $ docmir create-repo PROVIDER REPONAME

ARGUMENTS
  PROVIDER  (ecr|docker) The registry provider to create the repo
  REPONAME  Name you want the repo to be called. By defualt syncs are created with the name of the image

OPTIONS
  -h, --help  show CLI help

See code: src/commands/create-repo.ts

docmir create-sync PROVIDER REPONAME TAG

This command creates a sync with a provider. It stores everything to local file for future syncs

USAGE
  $ docmir create-sync PROVIDER REPONAME TAG

ARGUMENTS
  PROVIDER  (ecr|docker) The registry provider
  REPONAME  Name of the docker repo you want to sync
  TAG       The tag you want to sync

OPTIONS
  -h, --help  show CLI help

See code: src/commands/create-sync.ts

docmir help [COMMAND]

display help for docmir

USAGE
  $ docmir help [COMMAND]

ARGUMENTS
  COMMAND  command to show help for

OPTIONS
  --all  see all commands in CLI

See code: @oclif/plugin-help

docmir pull [IMAGE] [TAG]

Will pull an image from docker hub directly to local machine

USAGE
  $ docmir pull [IMAGE] [TAG]

ARGUMENTS
  IMAGE  Image to pull from dockerhub
  TAG    Tag to pull from dockerhub.  Defaults to latest if not used

OPTIONS
  -h, --help  Help command

See code: src/commands/pull.ts

docmir push PROVIDER IMAGE REPOURL TAG

Push an Image with tag to provider registry

USAGE
  $ docmir push PROVIDER IMAGE REPOURL TAG

ARGUMENTS
  PROVIDER  (ecr|docker) The provider you will push images to
  IMAGE
  REPOURL
  TAG

OPTIONS
  -h, --help  show CLI help

See code: src/commands/push.ts

docmir search-tags IMAGENAME [PROVIDER]

Searches dockerhub for available images of the docker registry

USAGE
  $ docmir search-tags IMAGENAME [PROVIDER]

ARGUMENTS
  IMAGENAME  Image you want to get tags from
  PROVIDER   (ecr|docker) [default: docker] The registry provider to search.

OPTIONS
  -h, --help  show CLI help

See code: src/commands/search-tags.ts

docmir sync REPO PROVIDER

Syncs all tags missing in target registry.

USAGE
  $ docmir sync REPO PROVIDER

OPTIONS
  -h, --help  show CLI help

DESCRIPTION
  Note: you must create a sync first before syncing the entire repo at this point.  This is best used for when you want 
  to keep a sync up to date

See code: src/commands/sync.ts

Provider Setup

Docker

In order to take advantage of being able to pull and push images without hitting rate limmite, its best to be logged in with a user. Use the auth command to set the user.

ECR

To use the AWS ecr provider you need to set the aws environment variables in order to authenticate. The following env variables need to be set:

AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY
AWS_ACCOUNT_ID

Future

  • Update search tags functionality to specify a list of tags based on version and wild card.
    • 1.2.* returns all patches
  • Update search tags to find tags across multiple repositories. (mulitple repo's with name busybox)
  • update sync functionality to sync based off limited search tag functionality
  • add providers azurecr.io, jfrog, quay.io, gcr.io, private dockerhub
  • multiprovider support
  • ability to set provider globally
0.6.3

3 years ago

0.6.2

3 years ago

0.6.5

3 years ago

0.6.4

3 years ago

0.6.1

3 years ago

0.5.4

3 years ago

0.5.3

3 years ago

0.5.2

3 years ago

0.6.0

3 years ago

0.5.0

3 years ago

0.5.1

3 years ago

0.4.2

3 years ago

0.2.1

3 years ago

0.4.1

3 years ago

0.4.0

3 years ago

0.3.1

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago