Skip to content

Instantly share code, notes, and snippets.

@dstrctrng
Last active December 15, 2015 19:59
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dstrctrng/5315149 to your computer and use it in GitHub Desktop.
Save dstrctrng/5315149 to your computer and use it in GitHub Desktop.
Running a docker with runsvdir, ssh in, then destroy it
function d {
did=$(docker run -d precise runsvdir /etc/service)
ip=$(docker inspect $did | grep IpAddress | cut -d'"' -f4)
nc -z $ip 22 && ssh -oStrictHostKeyChecking=no root@$ip
docker kill $did
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment