Skip to content

Latest commit

 

History

History
46 lines (26 loc) · 1.02 KB

README.md

File metadata and controls

46 lines (26 loc) · 1.02 KB

Test Docker

The container that obliges good development practices with Docker containers

Support testing Dockerfiles (static code analysis), Images (unit tests), Containers (functional tests) - mostly using Ruby / RSpec plus Dockerlint

Usage

To test this container using this container:

docker-compose up

To build ... have anothet compose file?

How to reuse

Clone the repository

  1. Update the Dockerfile to be your Dockerfile
  2. Run docker-compose up, it will probably fail
  3. Update the image_spec.rb this is your unit testing - don't add tests that need the container to be running
  4. Update the container_spec.rb this is your runtime functional testing
  5. If your container does work and then stops, ...
  6. If your container runs as a daemon, ...

Credits

A lot of inspiration came from here [http://www.unixdaemon.net/tools/testing-dockerfiles-with-serverspec/]

Blog Wanted a simple re-usable way to test containers Meaning static, unit, runtime How to make it work How to re-use What is really happening