Giter VIP home page Giter VIP logo

npm-bower-yo-grunt's Introduction

Container with node, npm, bower, grunt and yeoman packages.

Current build has the following versions:

  • node v6.2.0
  • npm v3.10.6
  • bower v1.7.9
  • yo v1.8.4
  • grunt-cli v1.2.0
  • grunt v0.4.5

User inside container is: uid=1000(user) gid=1000(user)

There is an entrypoint script (/entrypoint.sh) which runs npm install and bower install every time you initiate the container with the default command, which is grunt serve.

How to use it

If you already have a node app

  • Simply run the container mounting your files inside the it (at /home/user/src):
docker run --rm -it -v "$PWD:/home/user/src" -p 9000:9000 -p 35729:35729  pitervergara/npm-bower-yo-grunt

Your npm and bower requirements will be installed by the entrypoint script when you run the container.

If you do not have an app yet

  • From an empty directory, run the container mounting current folder inside it (at /home/user/src):
docker run --rm -it -v "$PWD:/home/user/src" pitervergara/npm-bower-yo-grunt /bin/sh
  • Once inside the container, use yo to scafold a new app
npm install -g generator-karma
npm install -g generator-angular
yo angular  # answer the questions to create the app
exit
  • Update you Gruntfile.js to listen on all addresses instead of only localhost

  • Run your brand new app

docker run --rm -it -v "$PWD:/home/user/src" -p 9000:9000 -p 35729:35729  pitervergara/npm-bower-yo-grunt

If you need to extend the container

  • Create a Dockerfile inside your project folder containing:
FROM pitervergara/npm-bower-yo-grunt

# add your customizations like...
USER root
RUN apk add autoconf

USER user
  • Build the container, running the following from within your project folder
docker build -t my-custom-container .
  • Than, run your custom container
docker run --rm -it -v "$PWD:/home/user/src" my-custom-container

npm-bower-yo-grunt's People

Contributors

pitervergara avatar

Watchers

 avatar

Forkers

prenastro

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.