This Docker image is essentially the same thing as dockerfile/nodejs-bower-gulp-runtime, with the following changes:
.bowerrc file (if it exists) before running bower install8080) to the node process via the PORT env variable.Install Docker.
Download automated build from public Docker Hub Registry: docker pull twistedstream/nodejs-es6-bower-gulp-runtime
(alternatively, you can build an image from Dockerfile: docker build -t="twistedstream/nodejs-es6-bower-gulp-runtime" github.com/twistedstream/docker_nodejs-es6-bower-gulp-runtime)
This image assumes that your application:
.bowerrc specifying Bower configuration.build task.server.js as the entrypoint script or define in package.json the attribute: "scripts": {"start": "node <entrypoint_script_js>"}8080 or uses the port passed by the PORT env variable.When building your application docker image, ONBUILD triggers install NPM module dependencies of your application using npm install.
Dockerfile in your Node.js application directory with the following content:FROM twistedstream/nodejs-es6-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/"
Content type
Image
Digest
sha256:8019b5b95…
Size
295.7 MB
Last updated
almost 11 years ago
docker pull twistedstream/nodejs-es6-bower-gulp-runtime