David K. Bainbridge | 9c24cbf | 2015-12-03 11:49:01 -0800 | [diff] [blame] | 1 | FROM xosproject/xos |
Tony Mack | 3bcbee8 | 2015-11-16 20:41:49 +0000 | [diff] [blame] | 2 | |
| 3 | # Install custom Ansible |
| 4 | RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y \ |
| 5 | openssh-client \ |
| 6 | python-crypto \ |
| 7 | python-jinja2 \ |
| 8 | python-paramiko \ |
| 9 | python-yaml \ |
| 10 | python-httplib2 \ |
| 11 | supervisor |
| 12 | |
Tony Mack | 80ed9e8 | 2015-12-16 17:40:00 +0000 | [diff] [blame] | 13 | RUN pip install -U \ |
| 14 | jinja2 |
| 15 | |
Tony Mack | 3bcbee8 | 2015-11-16 20:41:49 +0000 | [diff] [blame] | 16 | RUN \ |
| 17 | git clone -b release1.8.2 git://github.com/ansible/ansible.git /opt/ansible && \ |
| 18 | git clone -b release1.8.2 git://github.com/ansible/ansible-modules-extras.git /opt/ansible/lib/ansible/modules/extras && \ |
| 19 | git clone -b release1.8.2 git://github.com/ansible/ansible-modules-extras.git /opt/ansible/v2/ansible/modules/extras && \ |
| 20 | git clone git://github.com/sb98052/ansible-modules-core.git /opt/ansible/lib/ansible/modules/core && \ |
| 21 | git clone git://github.com/sb98052/ansible-modules-core.git /opt/ansible/v2/ansible/modules/core && \ |
| 22 | # git clone uses cached copy, doesn't pick up latest |
| 23 | git -C /opt/ansible pull && \ |
| 24 | git -C /opt/ansible/lib/ansible/modules/core pull && \ |
| 25 | git -C /opt/ansible/v2/ansible/modules/core pull |
| 26 | |
| 27 | |
| 28 | # For Observer |
| 29 | RUN mkdir -p /usr/local/share /bin /etc/ansible |
| 30 | |
Tony Mack | ae85c52 | 2015-11-16 20:45:39 +0000 | [diff] [blame] | 31 | RUN cp /tmp/xos/containers/synchronizer/conf/ansible-hosts /etc/ansible/hosts |
Tony Mack | 3bcbee8 | 2015-11-16 20:41:49 +0000 | [diff] [blame] | 32 | |
| 33 | ADD http://phantomjs.googlecode.com/files/phantomjs-1.7.0-linux-x86_64.tar.bz2 /usr/local/share/ |
| 34 | |
| 35 | RUN git clone git://git.planet-lab.org/fofum.git /tmp/fofum && \ |
| 36 | cd /tmp/fofum; python setup.py install && \ |
| 37 | rm -rf /tmp/fofum && \ |
| 38 | tar jxvf /usr/local/share/phantomjs-1.7.0-linux-x86_64.tar.bz2 -C /usr/local/share/ && \ |
| 39 | rm -f /usr/local/share/phantomjs-1.7.0-linux-x86_64.tar.bz2 && \ |
| 40 | ln -s /usr/local/share/phantomjs-1.7.0-linux-x86_64 /usr/local/share/phantomjs && \ |
| 41 | ln -s /usr/local/share/phantomjs/bin/phantomjs /bin/phantomjs |
| 42 | |
| 43 | |
| 44 | # Supervisor |
Tony Mack | ae85c52 | 2015-11-16 20:45:39 +0000 | [diff] [blame] | 45 | RUN cp /tmp/xos/containers/synchronizer/conf/synchronizer.conf /etc/supervisor/conf.d/ |
Tony Mack | 3bcbee8 | 2015-11-16 20:41:49 +0000 | [diff] [blame] | 46 | |
Tony Mack | 80ed9e8 | 2015-12-16 17:40:00 +0000 | [diff] [blame] | 47 | CMD update-ca-certificates && /usr/bin/supervisord -c /etc/supervisor/conf.d/synchronizer.conf |