- We will use Serverspec for this, which is a Ruby gem.
- We create a
Gemfile
in the directory as per instructions in serverspec.org.
Take a look at the Gemfile
.
Take a look at the stub files we created:
- A
spec
directory which will eventually contain the specification for our Dockerfile. - A single spec,
Dockerfile_spec.rb
which for now just has tworequire
statements. - A
Dockerfile
, which again, is empty.
- Now we
bundle install
to get the dependencies specified in ourGemfile
. - To execute the specs, we would do
bundle exec rspec
. - Since there are no specs, you won't see much useful output though.
Proceed to the step-2 directory where we will write some failing tests.