docker-run-kill
v1.0.2
Published
CLI wrapping `docker run` to kill container when CLI is terminated
Downloads
7
Maintainers
Readme
docker-run-kill
CLI wrapping docker run
to kill container when CLI is terminated
What is it?
Terminating a docker run
command does not always result in the container being killed.
This CLI fixes that by wrapping docker run
and killing the container before exiting when a termination signal is received.
Installation
npm
$ npm install docker-run-kill
yarn
$ yarn add docker-run-kill
Usage
$ docker-run-kill --help
Usage: docker-run-kill [RUN-KILL OPTIONS] [KILL OPTIONS] [RUN OPTIONS] IMAGE [COMMAND] [ARG...]
Run a command in a new container and kill that container when process is terminated.
Run-kill Options:
--help Output usage information
--name string Assign a name to the container (default is "docker_run_kill_{x}" where {x} is a random number)
Documentation for Kill Options & Run Options can be output with `docker kill --help` & `docker run --help` respectively.
*Important* To assign a name to the container, pass `--name` as a Run-kill Option, not a Run Option, since the latter won't be recognized.