Giter Site home page Giter Site logo

cloudxtreme / nodejs-bower-gulp-runtime Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dockerfile/nodejs-bower-gulp-runtime

0.0 1.0 0.0 148 KB

Node.js w/ Bower & Gulp runtime Dockerfile for trusted automated Docker builds.

Home Page: http://dockerfile.github.io/#/nodejs-bower-gulp-runtime

License: MIT License

nodejs-bower-gulp-runtime's Introduction

Node.js w/ Bower & Gulp runtime Dockerfile

This repository contains Dockerfile of Node.js w/ Bower & Gulp runtime for Docker's automated build published to the public Docker Hub Registry.

This image is a base image for easily running Node.js application.

It can automatically bundle a Node.js application with its dependencies and set the default command with no additional Dockerfile instructions.

This project heavily borrowed code from Google's google/nodejs-runtime Docker image.

Base Docker Image

Installation

  1. Install Docker.

  2. Download automated build from public Docker Hub Registry: docker pull dockerfile/nodejs-bower-gulp-runtime

    (alternatively, you can build an image from Dockerfile: docker build -t="dockerfile/nodejs-bower-gulp-runtime" github.com/dockerfile/nodejs-bower-gulp-runtime)

Usage

This image assumes that your application:

  • has a file named package.json listing its dependencies.
  • has a file named bower.json listing its dependencies.
  • has a file named Gulpfile.js registering build task.
  • has a file named server.js as the entrypoint script or define in package.json the attribute: "scripts": {"start": "node <entrypoint_script_js>"}
  • listens on port 8080

When building your application docker image, ONBUILD triggers install NPM module dependencies of your application using npm install.

  • Step 1: Create a Dockerfile in your Node.js application directory with the following content:
    FROM dockerfile/nodejs-bower-gulp-runtime
  • Step 2: Build your container image by running the following command in your application directory:
    docker build -t="app" .
  • Step 3: Run application by mapping port 8080:
    APP=$(docker run -d -p 8080 app)
    PORT=$(docker port $APP 8080 | awk -F: '{print $2}')
    echo "Open http://localhost:$PORT/"

nodejs-bower-gulp-runtime's People

Contributors

pilwon avatar

Watchers

 avatar

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.