Sign inSign up

ufirstgroup/npm-builder

By ufirstgroup

•Updated about 10 years ago

Allows developers to build NPM projects without the need to install NodeJS and NPM.

Image
0

3.0K

ufirstgroup/npm-builder repository overview

⁠UFirst Docker NPM builder

The NPM builder docker image allows developers to build NPM projects without the need to install NodeJS and NPM.

⁠Usage

Run any npm command by running the image ufirtgroup/npm-builder.

  • Mount the source folder as volume to source.
  • You should define the ENV variable USER_ID to be your local user id
⁠BrowserSync
  • If your setup runs BrowserSync you will have to maps the ports 3000 and 3001.
  • Also add a hosts entry according to your BrowserSync config so that BrowserSync can access the web server. ** If the application NGINX runs in another docker container, this can be a link to that container.
⁠Example
docker run -it \
  -e "USER_ID=$(id -u)" \
  -v $PWD/frontend:/source \
  -p "3000:3000" \
  -p "3001:3001" \
  ufirstgroup/npm-builder \
  npm start

Set up your project as follows:

  • Make sure everybody adds ./bin permanently to its $PATH ENV variable.
  • In you project root, create a folder ./bin
  • Create an executable file called npm with the following contend (change according to your config):
docker run -it \
  -e "USER_ID=$(id -u)" \
  -v $PWD/frontend:/source \
  -p "3000:3000" \
  -p "3001:3001" \
  ufirstgroup/npm-builder \
  $(basename $0) $@

Tag summary

Content type

Image

Digest

Size

244.7 MB

Last updated

about 10 years ago

docker pull ufirstgroup/npm-builder