Node.js w/ Bower & Gulp runtime Dockerfile for trusted automated Docker builds.
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.
Install Docker.
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)
This image assumes that your application:
build task.server.js as the entrypoint script or define in package.json the attribute: "scripts": {"start": "node <entrypoint_script_js>"}8080When building your application docker image, ONBUILD triggers install NPM module dependencies of your application using npm install.
Node.js application directory with the following content: FROM dockerfile/nodejs-bower-gulp-runtime
docker build -t="app" .
8080: APP=$(docker run -d -p 8080 app)
PORT=$(docker port $APP 8080 | awk -F: '{print $2}')
echo "Open http://localhost:$PORT/"