env-docker

1.0.1 • Public • Published

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

Package Sidebar

Install

npm i env-docker

Weekly Downloads

4

Version

1.0.1

License

MIT

Last publish

Collaborators

  • wilmoore