Skip to content

CLI tool to launch a docker container and create a Dockerfile for your NodeJS application

License

Notifications You must be signed in to change notification settings

brainsiq/dockerize-node-app

Repository files navigation

dockerize-node-app

Circle CI

CLI tool to generate a Dockerfile for running a NodeJS application, and starting a Docker container from it.

This project was a bit of fun to learn a bit more about combining Docker and Node.js. The features documented below should work but no more features will be added.

Installation

npm install -g dockerize-app

Usage

# creates dockerfile, builds image and runs container
cd /path/to/node/app
dockerize

Dockerfile generation

  • Sets node:x.x.x as the base image, where x.x.x is the latest version (using https://semver.io), which satisifies:
  • .nvmrc file
  • OR engines.node property from package.json
  • Adds source code into docker image
  • Runs npm install
  • Sets start command as npm start or node [entrypoint.js] depending on package.json settings

About

CLI tool to launch a docker container and create a Dockerfile for your NodeJS application

Resources

License

Stars

Watchers

Forks

Packages

No packages published