Kitchen::Docker

A Test Kitchen Driver for Docker.

Requirements

Known Issues

Installation and Setup

Please read the Driver usage page for more details.

Example .kitchen.local.yml:

---
driver_plugin: docker

platforms:
- name: ubuntu
  run_list:
  - recipe[apt]
- name: centos
  driver_config:
    image: "centos"
    platform: "rhel"
  run_list:
  - recipe[yum]

Configuration

image

The Docker image to use as the base for the suite containers. You can find images using the Docker Index.

The default value is base, an official Ubuntu image.

platform

The platform of the chosen image. This is used to properly bootstrap the suite container for Test Kitchen. Kitchen Docker currently supports:

  • debian or ubuntu
  • rhel or centos

The default value is ubuntu.

require_chef_omnibus

Determines whether or not a Chef Omnibus package will be installed. There are several different behaviors available:

  • true - the latest release will be installed. Subsequent converges will skip re-installing if chef is present.
  • latest - the latest release will be installed. Subsequent converges will always re-install even if chef is present.
  • <VERSION_STRING> (ex: 10.24.0) - the desired version string will be passed the the install.sh script. Subsequent converges will skip if the installed version and the desired version match.
  • false or nil - no chef is installed.

The default value is true.

forward

Suite container port(s) to forward to the host machine. You cannot specify the host port in the mappings, Docker does this for you.

Examples:

forward: 8080
forward:
- 22
- 80

Development

Pull requests are very welcome! Make sure your patches are well tested. Ideally create a topic branch for every separate change you make. For example:

  1. Fork the repo
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Authors

Created and maintained by Sean Porter ([email protected])

License

Apache 2.0 (see LICENSE)