ansible/test/utils/docker/ubuntu1204/Dockerfile
John R Barker 1861151fa4 [WIP] Extra test and build dependencies in Docker images (#15692)
* Merge conflicts:

* [skip ci] Revert changes to run_tests.sh

gundalow will update this in a different PR

* [skip ci] Add in ubuntu1604 and opensuseleap

NOTE: We are not configuring anything to use these new images yet.
Therefore no impact on Travis performance

* python-mysql for opensuse

* It's mysql-server on centos6
2016-05-20 07:37:06 -07:00

85 lines
2.3 KiB
Docker

FROM ubuntu:precise
RUN apt-get clean; apt-get update -y;
RUN apt-get install -y \
apache2 \
asciidoc \
acl \
bzip2 \
cdbs \
debhelper \
debianutils \
devscripts \
docbook-xml \
dpkg-dev \
fakeroot \
gawk \
git \
libxml2-utils \
locales \
make \
mercurial \
mysql-server \
reprepro \
ruby \
rubygems \
subversion \
sudo \
openssh-client \
openssh-server \
unzip \
zip \
xsltproc
# helpful things taken from the ubuntu-upstart Dockerfile:
# https://github.com/tianon/dockerfiles/blob/4d24a12b54b75b3e0904d8a285900d88d3326361/sbin-init/ubuntu/upstart/14.04/Dockerfile
ADD init-fake.conf /etc/init/fake-container-events.conf
# undo some leet hax of the base image
RUN rm /usr/sbin/policy-rc.d; \
rm /sbin/initctl; dpkg-divert --rename --remove /sbin/initctl
# remove some pointless services
RUN /usr/sbin/update-rc.d -f ondemand remove; \
for f in \
/etc/init/u*.conf \
/etc/init/mounted-dev.conf \
/etc/init/mounted-proc.conf \
/etc/init/mounted-run.conf \
/etc/init/mounted-tmp.conf \
/etc/init/mounted-var.conf \
/etc/init/hostname.conf \
/etc/init/networking.conf \
/etc/init/tty*.conf \
/etc/init/plymouth*.conf \
/etc/init/hwclock*.conf \
/etc/init/module*.conf\
; do \
dpkg-divert --local --rename --add "$f"; \
done; \
echo '# /lib/init/fstab: cleared out for bare-bones Docker' > /lib/init/fstab
# end things from ubuntu-upstart Dockerfile
RUN apt-get install -y \
python-coverage \
python-dev \
python-httplib2 \
python-jinja2 \
python-keyczar \
python-mock \
python-mysqldb \
python-nose \
python-paramiko \
python-pip \
python-setuptools \
python-virtualenv \
python-yaml
RUN pip install --upgrade jinja2 pycrypto
RUN rm /etc/apt/apt.conf.d/docker-clean
RUN /bin/sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/' /etc/sudoers
RUN mkdir /etc/ansible/
RUN /bin/echo -e "[local]\nlocalhost ansible_connection=local" > /etc/ansible/hosts
RUN locale-gen en_US.UTF-8
RUN ssh-keygen -q -t rsa -N '' -f /root/.ssh/id_rsa && \
cp /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys && \
for key in /etc/ssh/ssh_host_*_key.pub; do echo "localhost $(cat ${key})" >> /root/.ssh/known_hosts; done
ENV container docker
CMD ["/sbin/init"]