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

grunt-dockapp

v0.2.0

Published

Grunt task which allows you to start your nodejs application under docker instance.

Readme

grunt-dockapp

Task deploying your node application under Docker container.

Grunt plugin to deploy your application under Docker containers.

This module allows to accelerate the development of your node server application with Docker.

Grunt-dockapp is based on the module Dockerode, but your application should be easily isolated from it by this Grunt module.

Grunt plugin

Using docker as a grunt plugin will give you benefit of deploying your application during development. This actually gives you opportunity to test the application in full isolation of your local machine. One benefit of this is you can simply manages multiple applications under you own machine and use you local browsers for testing. This is very important during development of cookie-based applications. If you need to test two or more such application at the same time on the same machine, you cannot simply use different ports, since browser would not distinguish between them. Docker is very powerful tool allowing to instantinuosly deploy your application under fresh server and run the application straight away on different IP address.

Usage:

grunt dockapp

Installation

npm install --save-dev grunt-dock

Grunt configuration

Here is an example Grunt configuration:

grunt.initConfig({
  dockapp: {
    options: {
      name: 'myDockappImage',
      image: 'ubuntu',
      command: ['node', 'server/app.js' ],
      ports: [ '27017/tcp' ],               // Export also mongodb port
      env: {
        mongodb: '172.17.0.1:27017'         // Use hosts database settings in application
      },
      volumes: [__dirname + ':/root'],
      portBind: {
        '443/tcp': '8443'
      }
    }
  },

  watch: {
    server: {
      files: [
        'server/**/*.js'
      ],
      tasks: [ 'verify', 'copy', 'dockapp' ],
      options: {
        atBegin: true,
        spawn: false
      }
    }
  },

  verify: {
    ...
  },

  copy: {
    ...
  }
});

grunt.registerTask('serve', [ 'verify', 'copy', 'watch' ]);

Supported options:

  • name New image name. dockapp will always create new image with this name. Give a unique name or leave this option empty (default image will be dockapp:default)
  • image Name of base image or path to directory containing Dockerfile. Default is ./docker
  • command Array with command and arguments passed. This should be a command which will start your server. Default is [ 'node', 'app.js' ]
  • ports Array of ports to expose from the container. dockapp normally always expose ports 80/tcp and 443/tcp, so you do not need to provide this option. If you want to expose extra ports (e. g. mongodb database port), you can do this here
  • env JSON object defining extra environment variable for the process
  • volumes Array of host volumes you want to bind into docker filesystem, specified in </path/to/host/dir>:</container/path> format. Both have to be absolute paths.
  • portBind Port binding for your local filesystem. By default no ports will be used, so you only can access your application using docker container's IP (172.17.0.X:80 or 172.17.0.X:443). If for some reason you want to link your container's ports to your local host, you can define mapping in this option.
  • capabilities Array of capabilities (priviledges) the docker container starts with. For priviledged network operations add ["NET_ADMIN"].

Contributing

Pull requests are welcome.

License

The MIT License (MIT)

Copyright (c) 2015 Grzegorz Sikorski

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.