npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

docmir

v0.6.5

Published

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

Downloads

21

Readme

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