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 🙏

© 2026 – Pkg Stats / Ryan Hefner

docker-snapshot-image

v4.1.2

Published

A cli tool for creating a docker snapshot image of a node project

Readme

docker-snapshot-image

Build Status Code Coverage MIT License semantic-release Renovate enabled NPM Package NPM Package Downloads

Command line utiltiy that allows to easily create docker snapshot-images from an exising node.js project. The resulting images by default will be tagged as follows: {project-name}:{project-version}-{git-short-hash}

Prerequisites

Since this application makes use of git and docker, the two applications must be preinstalled on the system. Additionally, the directory in which the application is executed, must contain a valid package.json and Dockerfile.

Usage

You can use this utilty by installing it globally and executing it in your project's root directory:

npm i -g  docker-snapshot-image
cd /path/to/your/project
docker-snapshot-image

For a project with the following package.json:

{
  "name": "my-project",
  "version": "1.1.0",
  ...
}

executing the command would result in an image with a tag of the follwoing shape my-project:1.1.0-f941929. The hash appended to the version of the images always matches the short-version of the project's current git commit.

For advanced usage, command line flags can be used to change the default behavoir of the application:

| Flag | Description | | -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | --fixed-tag | Additionally tag the image with the specified tag (could be used to always add latest tag to image) | | --auto-tag-format | Format of the automatically generated tag.Available variable are {branch-name}, {pkg-version} and {commit-hash}. The default format is {pkg-version}-{commit-hash} | | --image-name | Use the specified custom name for the image | | --no-auto | Do not create the image with the automatic snapshot-tag specified in auto-tag-format |

However, for a fully detailed description of all flags that can be used, see the application's usage information (docker-snapshot-image --help).

NOTES

For branchname determination we are generally using the git rev-parse --abbrev-ref HEAD command. However, since some CI environments (e.g. Jenkins) are not actually checking out the actual branch but rather the pushed commit itself, we are optionally checking for environment varable BRANCH_NAME before starting branchname determination using git rev-parse.

Environment variables

The application reads the following environment variables:

  • CONTAINER_IMAGE_REGISTRY_PASS
  • CONTAINER_IMAGE_REGISTRY_USER
  • CONTAINER_IMAGE_REGISTRY_REPO