/akamai-node-edgegrid-docker

Build docker image to run Akamas's node edgegrid with a simple node script.

Primary LanguageDockerfileApache License 2.0Apache-2.0

akamai-node-edgegrid-docker

This example demonstrates how to build a docker image running Node.js with the Akamai Edgegrid dependency installed.

Keyword(s): edgegrid, node, docker

This demo also contains a very small Node.js project (list-network-lists.js) which lists all the Network Lists available by leveraging the List Network Lists GET API call

Requirements

Setup

  1. Clone this repository locally

  2. Build the Docker image

$ docker build --tag edgegrid-node:latest .

For this image I'm using the node 15.14.0 image based on alpine3.0. When the build process executes the npm install --production command it will install all the depencies specified in the `package.json' file.

  1. Start the container, allow read-only access to the local .edgerc file and run the app: npm start.

$ docker run -it --rm --name edgegrid-node -v $HOME/.edgerc:/root/.edgerc:ro edgegrid-node:latest npm start

In our package.json the start script is node list-network-lists.js