Skip to content

Container for testing Dockerfiles (static code analysis), Images (unit tests), Containers (functional tests) - mostly using Ruby / RSpec

License

Notifications You must be signed in to change notification settings

kramos/test-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Container for testing Dockerfiles (static code analysis), Images (unit tests), Containers (functional tests) - mostly using Ruby / RSpec

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages