Skip to content
This repository has been archived by the owner on Oct 21, 2022. It is now read-only.

Latest commit

 

History

History
37 lines (28 loc) · 1.03 KB

README.md

File metadata and controls

37 lines (28 loc) · 1.03 KB

docker-molecule

Docker container for running molecule, with in-container support for the Docker driver.

I built this primarily to use with ConcourseCI, for testing roles in pipelines, using Docker in Docker.

It relies on the docker-lib.sh file for wrapping docker commands, provided by Concourse, and entrykit.

You might need to start up rsyslogd in your concourse task definition, depending on your configured molecule log_driver.

Here's an example task definition that works for me:

platform: linux

image_resource:
  type: docker-image
  source:
    repository: gaahrdner/molecule
    tag: "latest"

inputs:
  - name: ansible

run:
  path: /bin/sh
  args:
  - -exc
  - |
    rsyslogd
    source /usr/local/bin/docker-lib.sh
    start_docker
    cd ansible || exit
    ansible-galaxy install -r requirements.yml
    cd roles/my_role || exit
    molecule test