Skip to content

Commit

Permalink
Document a helper script to SSH into a beaker docker container
Browse files Browse the repository at this point in the history
  • Loading branch information
ekohl committed Mar 24, 2017
1 parent 3c9e5d3 commit f686f73
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions moduleroot/.github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,17 @@ If you don't want to have to recreate the virtual machine every time you
can use `BEAKER_DESTROY=no` and `BEAKER_PROVISION=no`. On the first run you will
at least need `BEAKER_PROVISION` set to yes (the default). The Vagrantfile
for the created virtual machines will be in `.vagrant/beaker_vagrant_fies`.

When using docker you can log in using SSH. The password is always `root`. A
simple script can be used to easily log in:

```sh
#!/bin/sh
if [ -z $1 ] ; then
container=$(docker ps --quiet)
else
container=$1
fi
ip=$(docker inspect $container | jq '.[0]["NetworkSettings"]["IPAddress"]' -r)
ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null root@$ip
```

0 comments on commit f686f73

Please sign in to comment.