docker-npm icon indicating copy to clipboard operation
docker-npm copied to clipboard

Support a configuration file

Open fernandoacorreia opened this issue 5 years ago • 0 comments

If a .docker-npm file is present in the current directory, it will be imported.

This can be used to define these environment variables:

  • DOCKER_NPM_IMAGE_NAME: Base name of the Docker image. Default: mkenney/npm.
  • DOCKER_NPM_TAG: Docker image tag. Default specified in script code e.g. node-11-alpine.

Use cases:

  • DOCKER_NPM_TAG can be used to "pin" a project to a given node version.
  • DOCKER_NPM_IMAGE_NAME can be used to optionally decouple the scripts from the default mkenney/npm image, e.g. for experimenting with newer node versions.

Example:

❯ cat .docker-npm 
export DOCKER_NPM_IMAGE_NAME=fernando
export DOCKER_NPM_TAG=node-12-alpine

fernandoacorreia avatar Sep 30 '19 02:09 fernandoacorreia