Skip to content

Instantly share code, notes, and snippets.

@kenwdelong
Created May 1, 2015 03:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kenwdelong/35d3da0f6371d7299d40 to your computer and use it in GitHub Desktop.
Save kenwdelong/35d3da0f6371d7299d40 to your computer and use it in GitHub Desktop.
Adding Ansible to a Docker image of Jenkins
FROM jenkins:1.596
# Adapted from https://github.com/ansible/ansible-docker-base/blob/master/devel-ubuntu14.04/Dockerfile
USER root
RUN apt-get -y update && \
apt-get install -y python-yaml python-jinja2 python-httplib2 python-keyczar python-paramiko python-setuptools python-pkg-resources git python-pip
RUN pip install boto
RUN mkdir /etc/ansible/
RUN echo '[local]\nlocalhost\n' > /etc/ansible/hosts
RUN mkdir /opt/ansible/
RUN git clone http://github.com/ansible/ansible.git /opt/ansible/ansible
WORKDIR /opt/ansible/ansible
RUN git submodule update --init
RUN git checkout tags/v1.8.2
ENV PATH /opt/ansible/ansible/bin:/bin:/usr/bin:/sbin:/usr/sbin
ENV PYTHONPATH /opt/ansible/ansible/lib
ENV ANSIBLE_LIBRARY /opt/ansible/ansible/library
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment