1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

[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
This commit is contained in:
John R Barker 2016-05-20 15:37:06 +01:00 committed by Toshio Kuratomi
parent 8d3da09eae
commit 1861151fa4
8 changed files with 200 additions and 7 deletions

View file

@ -3,12 +3,18 @@ FROM centos:centos6
RUN yum -y update; yum clean all; RUN yum -y update; yum clean all;
RUN yum -y install \ RUN yum -y install \
acl \ acl \
asciidoc \
bzip2 \
epel-release \ epel-release \
file \ file \
gcc \ gcc \
git \ git \
make \ make \
mercurial \ mercurial \
mysql \
mysql-server \
MySQL-python \
rpm-build \
rubygems \ rubygems \
sed \ sed \
subversion \ subversion \
@ -16,7 +22,8 @@ RUN yum -y install \
unzip \ unzip \
openssh-clients \ openssh-clients \
openssh-server \ openssh-server \
which which \
zip
RUN yum -y install \ RUN yum -y install \
PyYAML \ PyYAML \
python-coverage \ python-coverage \

View file

@ -11,13 +11,18 @@ rm -f /lib/systemd/system/basic.target.wants/*; \
rm -f /lib/systemd/system/anaconda.target.wants/*; rm -f /lib/systemd/system/anaconda.target.wants/*;
RUN yum -y install \ RUN yum -y install \
acl \ acl \
asciidoc \
dbus-python \ dbus-python \
bzip2 \
epel-release \ epel-release \
file \ file \
git \ git \
iproute \ iproute \
make \ make \
mercurial \ mercurial \
mariadb-server \
MySQL-python \
rpm-build \
rubygems \ rubygems \
subversion \ subversion \
sudo \ sudo \

View file

@ -11,7 +11,9 @@ rm -f /lib/systemd/system/basic.target.wants/*; \
rm -f /lib/systemd/system/anaconda.target.wants/*; rm -f /lib/systemd/system/anaconda.target.wants/*;
RUN dnf -y install \ RUN dnf -y install \
acl \ acl \
asciidoc \
dbus-python \ dbus-python \
bzip2 \
file \ file \
findutils \ findutils \
git \ git \
@ -19,6 +21,8 @@ RUN dnf -y install \
iproute \ iproute \
make \ make \
mercurial \ mercurial \
mariadb-server \
MySQL-python \
procps \ procps \
PyYAML \ PyYAML \
python-coverage \ python-coverage \
@ -32,6 +36,7 @@ RUN dnf -y install \
python-pip \ python-pip \
python-setuptools \ python-setuptools \
python-virtualenv \ python-virtualenv \
rpm-build \
rubygems \ rubygems \
subversion \ subversion \
sudo \ sudo \
@ -40,7 +45,8 @@ RUN dnf -y install \
which \ which \
openssh-clients \ openssh-clients \
openssh-server \ openssh-server \
yum yum \
zip
RUN localedef --quiet -c -i en_US -f UTF-8 en_US.UTF-8 RUN localedef --quiet -c -i en_US -f UTF-8 en_US.UTF-8
RUN /usr/bin/sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/' /etc/sudoers RUN /usr/bin/sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/' /etc/sudoers
RUN mkdir /etc/ansible/ RUN mkdir /etc/ansible/

View file

@ -1,4 +1,4 @@
# Latest version of centos # Latest version of fedora 23
FROM fedora:23 FROM fedora:23
RUN dnf -y update; dnf clean all RUN dnf -y update; dnf clean all
RUN (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done); \ RUN (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done); \
@ -11,7 +11,9 @@ rm -f /lib/systemd/system/basic.target.wants/*; \
rm -f /lib/systemd/system/anaconda.target.wants/*; rm -f /lib/systemd/system/anaconda.target.wants/*;
RUN dnf -y install \ RUN dnf -y install \
acl \ acl \
asciidoc \
dbus-python \ dbus-python \
bzip2 \
file \ file \
findutils \ findutils \
glibc-common \ glibc-common \
@ -19,6 +21,8 @@ RUN dnf -y install \
iproute \ iproute \
make \ make \
mercurial \ mercurial \
mariadb-server \
MySQL-python \
procps \ procps \
PyYAML \ PyYAML \
python-coverage \ python-coverage \
@ -32,6 +36,7 @@ RUN dnf -y install \
python-pip \ python-pip \
python-setuptools \ python-setuptools \
python-virtualenv \ python-virtualenv \
rpm-build \
rubygems \ rubygems \
subversion \ subversion \
sudo \ sudo \
@ -40,7 +45,8 @@ RUN dnf -y install \
which \ which \
openssh-clients \ openssh-clients \
openssh-server \ openssh-server \
yum yum \
zip
RUN localedef --quiet -f ISO-8859-1 -i pt_BR pt_BR RUN localedef --quiet -f ISO-8859-1 -i pt_BR pt_BR
RUN localedef --quiet -f ISO-8859-1 -i es_MX es_MX RUN localedef --quiet -f ISO-8859-1 -i es_MX es_MX
RUN /usr/bin/sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/' /etc/sudoers RUN /usr/bin/sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/' /etc/sudoers

View file

@ -0,0 +1,69 @@
FROM opensuse:leap
RUN zypper --gpg-auto-import-keys --non-interactive ref && \
zypper --gpg-auto-import-keys --non-interactive up
#RUN yum -y update; yum clean all; yum -y swap fakesystemd systemd
RUN zypper --non-interactive install --auto-agree-with-licenses \
acl \
asciidoc \
bzip2 \
dbus-1-python \
gcc \
git \
glibc-locale \
iproute \
lsb-release \
make \
mercurial \
mariadb \
python-mysql \
openssh \
rpm-build \
ruby \
subversion \
sudo \
tar \
unzip \
which \
zip \
python-PyYAML \
python-coverage \
python-httplib2 \
python-jinja2 \
python-keyczar \
python-mock \
python-nose \
python-paramiko \
python-pip \
python-setuptools \
python-virtualenv
# systemd path differs from rhel
ENV LIBSYSTEMD=/usr/lib/systemd/system
RUN (cd ${LIBSYSTEMD}/sysinit.target.wants/; for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done); \
rm -f ${LIBSYSTEMD}/multi-user.target.wants/*; \
rm -f /etc/systemd/system/*.wants/*; \
rm -f ${LIBSYSTEMD}/local-fs.target.wants/*; \
rm -f ${LIBSYSTEMD}/sockets.target.wants/*udev*; \
rm -f ${LIBSYSTEMD}/sockets.target.wants/*initctl*; \
rm -f ${LIBSYSTEMD}/basic.target.wants/*;
# don't create systemd-session for ssh connections
RUN sed -i /pam_systemd/d /etc/pam.d/common-session-pc
#RUN localedef --quiet -c -i en_US -f UTF-8 en_US.UTF-8
RUN mkdir /etc/ansible/
RUN /usr/bin/echo -e '[local]\nlocalhost ansible_connection=local' > /etc/ansible/hosts
VOLUME /sys/fs/cgroup /run /tmp
RUN ssh-keygen -q -t rsa1 -N '' -f /etc/ssh/ssh_host_key && \
ssh-keygen -q -t dsa -N '' -f /etc/ssh/ssh_host_dsa_key && \
ssh-keygen -q -t rsa -N '' -f /etc/ssh/ssh_host_rsa_key && \
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
# explicitly enable the service, opensuse default to disabled services
RUN systemctl enable sshd.service
ENV container=docker
CMD ["/sbin/init"]

View file

@ -1,20 +1,34 @@
FROM ubuntu:precise FROM ubuntu:precise
RUN apt-get clean; apt-get update -y; RUN apt-get clean; apt-get update -y;
RUN apt-get install -y \ RUN apt-get install -y \
apache2 \
asciidoc \
acl \ acl \
bzip2 \
cdbs \
debhelper \
debianutils \ debianutils \
devscripts \
docbook-xml \
dpkg-dev \
fakeroot \
gawk \ gawk \
git \ git \
libxml2-utils \
locales \ locales \
make \ make \
mercurial \ mercurial \
mysql-server \
reprepro \
ruby \ ruby \
rubygems \ rubygems \
subversion \ subversion \
sudo \ sudo \
openssh-client \ openssh-client \
openssh-server \ openssh-server \
unzip unzip \
zip \
xsltproc
# helpful things taken from the ubuntu-upstart Dockerfile: # helpful things taken from the ubuntu-upstart Dockerfile:
# https://github.com/tianon/dockerfiles/blob/4d24a12b54b75b3e0904d8a285900d88d3326361/sbin-init/ubuntu/upstart/14.04/Dockerfile # https://github.com/tianon/dockerfiles/blob/4d24a12b54b75b3e0904d8a285900d88d3326361/sbin-init/ubuntu/upstart/14.04/Dockerfile
@ -51,6 +65,7 @@ RUN apt-get install -y \
python-jinja2 \ python-jinja2 \
python-keyczar \ python-keyczar \
python-mock \ python-mock \
python-mysqldb \
python-nose \ python-nose \
python-paramiko \ python-paramiko \
python-pip \ python-pip \

View file

@ -1,19 +1,33 @@
FROM ubuntu:trusty FROM ubuntu:trusty
RUN apt-get clean; apt-get update -y; RUN apt-get clean; apt-get update -y;
RUN apt-get install -y \ RUN apt-get install -y \
apache2 \
asciidoc \
acl \ acl \
bzip2 \
cdbs \
debhelper \
debianutils \ debianutils \
devscripts \
docbook-xml \
dpkg-dev \
fakeroot \
gawk \ gawk \
git \ git \
libxml2-utils \
locales \ locales \
make \ make \
mercurial \ mercurial \
mysql-server \
reprepro \
ruby \ ruby \
subversion \ subversion \
sudo \ sudo \
openssh-client \ openssh-client \
openssh-server \ openssh-server \
unzip unzip \
zip \
xsltproc
# helpful things taken from the ubuntu-upstart Dockerfile: # helpful things taken from the ubuntu-upstart Dockerfile:
# https://github.com/tianon/dockerfiles/blob/4d24a12b54b75b3e0904d8a285900d88d3326361/sbin-init/ubuntu/upstart/14.04/Dockerfile # https://github.com/tianon/dockerfiles/blob/4d24a12b54b75b3e0904d8a285900d88d3326361/sbin-init/ubuntu/upstart/14.04/Dockerfile
@ -49,6 +63,7 @@ RUN apt-get install -y \
python-jinja2 \ python-jinja2 \
python-keyczar \ python-keyczar \
python-mock \ python-mock \
python-mysqldb \
python-nose \ python-nose \
python-paramiko \ python-paramiko \
python-pip \ python-pip \

View file

@ -0,0 +1,70 @@
FROM ubuntu:16.04
ENV DEBIAN_FRONTEND noninteractive
ENV container docker
RUN apt-get clean; apt-get update -y;
RUN echo 'APT::Install-Recommends "0"; \n\
APT::Get::Assume-Yes "true"; \n\
APT::Install-Suggests "0";' > /etc/apt/apt.conf.d/01buildconfig
RUN apt-get install -y \
apache2 \
asciidoc \
acl \
bzip2 \
cdbs \
debhelper \
debianutils \
devscripts \
docbook-xml \
dpkg-dev \
fakeroot \
gawk \
git \
iproute2 \
libxml2-utils \
locales \
lsb-release \
make \
mercurial \
mysql-server \
openssh-client \
openssh-server \
python-dbus \
reprepro \
rsync \
ruby \
subversion \
sudo \
unzip \
zip \
xsltproc \
python-coverage \
python-httplib2 \
python-jinja2 \
python-keyczar \
python-mock \
python-mysqldb \
python-nose \
python-paramiko \
python-pip \
python-setuptools \
python-virtualenv \
virtualenv \
python-yaml
# some tests assume the .deb is cached
RUN rm /etc/apt/apt.conf.d/docker-clean
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
RUN mkdir /etc/ansible/
RUN /bin/echo -e "[local]\nlocalhost ansible_connection=local" > /etc/ansible/hosts
VOLUME /sys/fs/cgroup /run/lock /run /tmp
CMD ["/sbin/init"]