Last active
August 29, 2015 14:25
-
-
Save mkurzeja/09f780d24cfffedd214f to your computer and use it in GitHub Desktop.
Docker proxy - runs the container and stops it properly when exit signal received
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Usage: | |
# dockerProxessProxy.sh ContainerName param1 param2 param3 | |
# ContainerName - required, param* are passed to docker run command | |
NAME=$1 | |
trap "{ echo Stopping $NAME; docker stop $NAME; exit 0;}" EXIT | |
docker run --name $NAME --rm -a stdout -a stderr ${*:2} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment