Created
February 3, 2017 13:17
-
-
Save chussenot/82399f1622900ce255ade95f726a93ef to your computer and use it in GitHub Desktop.
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 | |
set -e | |
function abort() | |
{ | |
echo "$@" | |
exit 1 | |
} | |
function cleanup() | |
{ | |
echo " --> Stopping container" | |
docker stop $ID >/dev/null | |
docker rm $ID >/dev/null | |
} | |
PWD=`pwd` | |
echo " --> Starting insecure container" | |
ID=`docker run -d -v $PWD/test:/test $NAME:$VERSION /sbin/my_init --enable-insecure-key` | |
sleep 1 | |
trap cleanup EXIT | |
echo " --> Ruby version in container" | |
docker exec -t -i $ID ruby --version | |
echo " --> Node version in container" | |
docker exec -t -i $ID node --version | |
echo " --> ENV in container" | |
docker exec -t -i $ID env | |
echo " --> nginx version" | |
docker exec -t -i $ID nginx -v | |
sleep 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment