ned-build-image
Builds a docker image for running a node application developed with ned.
Last updated 4 years ago by m59 .
VOL · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install ned-build-image 
SYNC missed versions from official npm registry.

ned-build-image

Builds a docker image for running a node application developed with ned.

install

npm install ned-build-image

cli usage

ned-build-image <mode>

API

buildImage(pathToApp, mode)

  • pathToApp: string path to node application
  • mode: string
    • 'dev' build image tagged ned-app-dev for development.
    • 'prod' build image taggednedapp-prod for production.

Dockerfile

If there is a Dockerfile in the app root, it will be built and used as the base image. It must have the following installed:

  • node >= 6
  • npm
  • python
  • make
  • g++

dev image

run

docker run -it --rm \
  -v $PWD:/app \
  --user $(id -u) \
  ned-app-dev

CMD

  • watches ./src for changes
  • lints app
  • transpiles app
  • runs app and tests
ned dev -ltw

volumes

/app

Mount the node application here. ./src will be transpiled and output to ./build when files in ./src change.

prod image

Contains the transpiled app under /app/build ready for execution.

run

docker run -it ned-app-prod

CMD

The default command just executes the app.

Current Tags

  • 0.0.2                                ...           latest (4 years ago)

2 Versions

  • 0.0.2                                ...           4 years ago
  • 0.0.0                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (5)
Dev Dependencies (3)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |