Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

env-docker

wilmoore12MIT1.0.1

Run a docker command with environment variables populated via .env.

docker, docker-run, run, env, envc, environments, environment, 12factor

readme

env-docker

NOTE: YOU NO LONGER NEED THIS AS YOU CAN NOW PROVIDE YOUR .env FILE VIA docker-compose.yml WITH env_file. YOU THEN TYPE docker-compose up TO START YOUR APPLICATION.

Build Status NPM version NPM downloads LICENSE

Prepare a docker command with environment variables populated via .env.

$ npm install env-docker --save-dev

Available Commands

run
$ env-docker run -- --rm -ti $(basename $PWD)

This can be conveniently used via npm run-scripts as depicted below:

"scripts": {
  "docker:build": "docker build -t $npm_package_name .",
  "docker:run": "eval $(env-docker run -- -p 3000:3000 --rm -ti $npm_package_name) || true",
  "predocker:run": "npm run docker:build",
},

To re-build and run, just type the following:

$ npm run docker:run

License

MIT

changelog

Change Log

All notable changes to this project will be documented in this file.

0.1.0 - 2014-12-17

Added

  • initial release