The apt-* commands in the Dockerfile are hard-coded for Debian based distributions. It will be good to allow detection of OS family and change them with their yum equivalents.
$ ansible-test logstash -i centos
Sending build context to Docker daemon 193.5kB
Step 1/8 : FROM centos
---> 328edcd84f1b
Step 2/8 : MAINTAINER Rob McQueen
---> Using cache
---> d1c31afe5d68
Step 3/8 : RUN apt-get update && apt-get install -y python-dev python-virtualenv sudo
---> Running in 977da8b18afa
/bin/sh: apt-get: command not found
The command '/bin/sh -c apt-get update && apt-get install -y python-dev python-virtualenv sudo' returned a non-zero code: 127
Traceback (most recent call last):
File "/usr/local/bin/ansible-test", line 69, in <module>
main(context)
File "/usr/local/bin/ansible-test", line 45, in main
'-t', DOCKER_CONTAINER, '.']
File "/usr/lib/python2.7/subprocess.py", line 186, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['docker', 'build', '-t', 'testbox', '.']' returned non-zero exit status 127
The apt-* commands in the Dockerfile are hard-coded for Debian based distributions. It will be good to allow detection of OS family and change them with their yum equivalents.