Public | Automated Build

Last pushed: 13 days ago
Short Description
Short description is empty for this repo.
Full Description

readytalk/nodejs-runtime

readytalk/nodejs-runtime is a docker base image for easily running nodejs application.

It can automatically bundle a nodejs application with its dependencies and set the default entrypoint with no additional Dockerfile instructions.

It is based on readytalk/nodejs base image.

Usage

  • Create a Dockerfile in your nodejs application directory with the following content:

      FROM readytalk/nodejs-runtime
    
  • Run the following command in your application directory:

      docker build -t app .
    

Sample

See the sources for readytalk/nodejs-hello based on this image.

Notes

The image assumes that your application:

  • has a file named package.json listing its dependencies.
  • 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

Example

package.json

{
  "name": "hello-world",
  "description": "hello world test app",
  "version": "0.0.1",
  "private": true,
  "dependencies": {
    "express": "3.x"
  },
  "scripts": {"start": "node app.js"}
}

When building your application docker image, ONBUILD triggers fetch the dependencies listed in package.json and cache them appropriatly.

Docker Pull Command
Owner
readytalk
Source Repository

Comments (0)