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

node-dock

v0.4.0

Published

Handy interface for docker shell command

Downloads

6

Readme

Dock

A sweet remedy for all your docker problems

Dock is an handy command that plugs on top of your usual docker commands adding some sugar and some handy function on top of it.

What does it mean?

This:

~  ᐅ docker ps
CONTAINER ID        IMAGE                           COMMAND                CREATED             STATUS              PORTS                    NAMES
b844c6472721        tutum/mysql:latest   "/bin/sh -c 'export    3 seconds ago       Up 3 seconds        0.0.0.0:4000->4000/tcp   sharp_elion         
~  ᐅ docker stop b844c6472721
b844c6472721

becomes this:

~  ᐅ dock stop tutum/mysql
running stop tutum/mysql d1ac1f9a916d on container d1ac1f9a916d
d1ac1f9a916d

sweeeeet

Installation

Install this library through NPM:

npm install -g node-dock

Usage

Dock comes with 2 handy commands on top of the usual ones:

List

Get the list of all your current containers:

~  ᐅ dock list
Image name: namshi/nginx-proxy:latest (id: 3563cd490f63)
Image name: tutum/mysql:latest (id: d1ac1f9a916d)

Clean

Cleanup all your inactive ones:

~  ᐅ dock clean
running rm d1ac1f9a916d on container d1ac1f9a916d
d1ac1f9a916d

Clean Images

And cleanup all your un-tagged images:

~  ᐅ dock clean images
running rmi d56522c3164e on container d56522c3164e
running rmi f1365340886d on container f1365340886d
running rmi f6a404a7172d on container f6a404a7172d
running rmi 205d4782d521 on container 205d4782d521
running rmi cea515493893 on container cea515493893
running rmi 7af0498ecd5b on container 7af0498ecd5b
running rmi 41e666c0e178 on container 41e666c0e178
running rmi f725abdabf27 on container f725abdabf27
running rmi 19fb2516cde9 on container 19fb2516cde9
running rmi 7523d53c4fea on container 7523d53c4fea
running rmi 533f6ceea42d on container 533f6ceea42d
running rmi 54b14e4b8f1a on container 54b14e4b8f1a

Run a docker command on a container, by image name

How many times you've dreamt of:

docker logs -f tutum/mysql

...now it's possible!

Whenever you create and run your new container you always know the image's name, but the id can be rather annoying to get every time.

Just add a --image || -i <name>, or your image name as last argument, in your usual docker command and dock will figure out what to do for you :)

dock <command> <commandArgs> --image <imageName>

# ie:
dock logs -f --image mikaelhg/docker-rabbitmq

# or
dock <command> <commandArgs> --i <imageName>

# or you can even omit the flag
dock logs -f mikaelhg/docker-rabbitmq