Skip to content

Commit

Permalink
add usage instructions for inspec container
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-rock committed Apr 16, 2016
1 parent 1faf6d6 commit fab54dd
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,31 @@ InSpec requires Ruby ( >1.9 ).
gem install inspec
```

### Usage via Docker

```
docker pull chef/inspec
# opens a shell within the container
docker run -it --rm chef/inspec shell
```

In order to be able to connect to a remote host via key files, you need to mount the local directory into the container:

```
$ ls -1
vagrant
test.rb
$ docker pull chef/inspec
# The container uses /share as work directory, -v mounts the current directory to /share
$ docker run -it --rm -v $(pwd):/share chef/inspec exec test.rb -t ssh://root@192.168.64.2:11022 -i vagrant
..
Finished in 0.04321 seconds (files took 0.54917 seconds to load)
2 examples, 0 failures
```

### Install it from source

That requires [bundler](http://bundler.io/):
Expand Down

0 comments on commit fab54dd

Please sign in to comment.