mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-25 06:10:22 -07:00
Update Ubuntu docker images.
- Reduce image size by skipping recommended packages. - Consolidate and sort packages to install. - Improve consistency between Ubuntu versions. - Combine apt-get update and install to avoid caching stale updates.
This commit is contained in:
parent
0cf9f9d715
commit
349b06974e
3 changed files with 71 additions and 73 deletions
|
@ -1,9 +1,10 @@
|
||||||
FROM ubuntu:precise
|
FROM ubuntu:12.04
|
||||||
RUN apt-get clean; apt-get update -y;
|
|
||||||
RUN apt-get install -y \
|
RUN apt-get update -y && \
|
||||||
|
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
||||||
|
acl \
|
||||||
apache2 \
|
apache2 \
|
||||||
asciidoc \
|
asciidoc \
|
||||||
acl \
|
|
||||||
bzip2 \
|
bzip2 \
|
||||||
cdbs \
|
cdbs \
|
||||||
debhelper \
|
debhelper \
|
||||||
|
@ -13,22 +14,40 @@ RUN apt-get install -y \
|
||||||
dpkg-dev \
|
dpkg-dev \
|
||||||
fakeroot \
|
fakeroot \
|
||||||
gawk \
|
gawk \
|
||||||
|
gcc \
|
||||||
git \
|
git \
|
||||||
libxml2-utils \
|
libxml2-utils \
|
||||||
locales \
|
locales \
|
||||||
make \
|
make \
|
||||||
mercurial \
|
mercurial \
|
||||||
mysql-server \
|
mysql-server \
|
||||||
|
openssh-client \
|
||||||
|
openssh-server \
|
||||||
|
python-coverage \
|
||||||
|
python-dev \
|
||||||
|
python-httplib2 \
|
||||||
|
python-keyczar \
|
||||||
|
python-mock \
|
||||||
|
python-mysqldb \
|
||||||
|
python-nose \
|
||||||
|
python-paramiko \
|
||||||
|
python-pip \
|
||||||
|
python-setuptools \
|
||||||
|
python-virtualenv \
|
||||||
|
python-yaml \
|
||||||
reprepro \
|
reprepro \
|
||||||
|
rsync \
|
||||||
ruby \
|
ruby \
|
||||||
rubygems \
|
rubygems \
|
||||||
subversion \
|
subversion \
|
||||||
sudo \
|
sudo \
|
||||||
openssh-client \
|
|
||||||
openssh-server \
|
|
||||||
unzip \
|
unzip \
|
||||||
|
xsltproc \
|
||||||
zip \
|
zip \
|
||||||
xsltproc
|
&& \
|
||||||
|
apt-get clean
|
||||||
|
|
||||||
|
RUN pip install --upgrade jinja2 pycrypto
|
||||||
|
|
||||||
# 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
|
||||||
|
@ -58,29 +77,14 @@ RUN /usr/sbin/update-rc.d -f ondemand remove; \
|
||||||
echo '# /lib/init/fstab: cleared out for bare-bones Docker' > /lib/init/fstab
|
echo '# /lib/init/fstab: cleared out for bare-bones Docker' > /lib/init/fstab
|
||||||
# end things from ubuntu-upstart Dockerfile
|
# 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 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 mkdir /etc/ansible/
|
||||||
RUN /bin/echo -e "[local]\nlocalhost ansible_connection=local" > /etc/ansible/hosts
|
RUN /bin/echo -e "[local]\nlocalhost ansible_connection=local" > /etc/ansible/hosts
|
||||||
RUN locale-gen en_US.UTF-8
|
RUN locale-gen en_US.UTF-8
|
||||||
RUN ssh-keygen -q -t rsa -N '' -f /root/.ssh/id_rsa && \
|
RUN ssh-keygen -q -t rsa -N '' -f /root/.ssh/id_rsa && \
|
||||||
cp /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys && \
|
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
|
for key in /etc/ssh/ssh_host_*_key.pub; do echo "localhost $(cat ${key})" >> /root/.ssh/known_hosts; done
|
||||||
|
VOLUME /sys/fs/cgroup /run/lock /run /tmp
|
||||||
RUN pip install junit-xml
|
RUN pip install junit-xml
|
||||||
ENV container docker
|
ENV container=docker
|
||||||
CMD ["/sbin/init"]
|
CMD ["/sbin/init"]
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
FROM ubuntu:trusty
|
FROM ubuntu:14.04
|
||||||
RUN apt-get clean; apt-get update -y;
|
|
||||||
RUN apt-get install -y \
|
RUN apt-get update -y && \
|
||||||
|
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
||||||
|
acl \
|
||||||
apache2 \
|
apache2 \
|
||||||
asciidoc \
|
asciidoc \
|
||||||
acl \
|
|
||||||
bzip2 \
|
bzip2 \
|
||||||
cdbs \
|
cdbs \
|
||||||
debhelper \
|
debhelper \
|
||||||
|
@ -19,15 +20,30 @@ RUN apt-get install -y \
|
||||||
make \
|
make \
|
||||||
mercurial \
|
mercurial \
|
||||||
mysql-server \
|
mysql-server \
|
||||||
|
openssh-client \
|
||||||
|
openssh-server \
|
||||||
|
python-coverage \
|
||||||
|
python-httplib2 \
|
||||||
|
python-jinja2 \
|
||||||
|
python-keyczar \
|
||||||
|
python-mock \
|
||||||
|
python-mysqldb \
|
||||||
|
python-nose \
|
||||||
|
python-paramiko \
|
||||||
|
python-pip \
|
||||||
|
python-setuptools \
|
||||||
|
python-virtualenv \
|
||||||
|
python-yaml \
|
||||||
reprepro \
|
reprepro \
|
||||||
|
rsync \
|
||||||
ruby \
|
ruby \
|
||||||
subversion \
|
subversion \
|
||||||
sudo \
|
sudo \
|
||||||
openssh-client \
|
|
||||||
openssh-server \
|
|
||||||
unzip \
|
unzip \
|
||||||
|
xsltproc \
|
||||||
zip \
|
zip \
|
||||||
xsltproc
|
&& \
|
||||||
|
apt-get clean
|
||||||
|
|
||||||
# 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
|
||||||
|
@ -57,27 +73,14 @@ RUN /usr/sbin/update-rc.d -f ondemand remove; \
|
||||||
echo '# /lib/init/fstab: cleared out for bare-bones Docker' > /lib/init/fstab
|
echo '# /lib/init/fstab: cleared out for bare-bones Docker' > /lib/init/fstab
|
||||||
# end things from ubuntu-upstart Dockerfile
|
# end things from ubuntu-upstart Dockerfile
|
||||||
|
|
||||||
RUN apt-get install -y \
|
|
||||||
python-coverage \
|
|
||||||
python-httplib2 \
|
|
||||||
python-jinja2 \
|
|
||||||
python-keyczar \
|
|
||||||
python-mock \
|
|
||||||
python-mysqldb \
|
|
||||||
python-nose \
|
|
||||||
python-paramiko \
|
|
||||||
python-pip \
|
|
||||||
python-setuptools \
|
|
||||||
python-virtualenv \
|
|
||||||
python-yaml
|
|
||||||
RUN rm /etc/apt/apt.conf.d/docker-clean
|
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 mkdir /etc/ansible/
|
||||||
RUN /bin/echo -e "[local]\nlocalhost ansible_connection=local" > /etc/ansible/hosts
|
RUN /bin/echo -e "[local]\nlocalhost ansible_connection=local" > /etc/ansible/hosts
|
||||||
RUN locale-gen en_US.UTF-8
|
RUN locale-gen en_US.UTF-8
|
||||||
RUN ssh-keygen -q -t rsa -N '' -f /root/.ssh/id_rsa && \
|
RUN ssh-keygen -q -t rsa -N '' -f /root/.ssh/id_rsa && \
|
||||||
cp /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys && \
|
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
|
for key in /etc/ssh/ssh_host_*_key.pub; do echo "localhost $(cat ${key})" >> /root/.ssh/known_hosts; done
|
||||||
|
VOLUME /sys/fs/cgroup /run/lock /run /tmp
|
||||||
RUN pip install junit-xml
|
RUN pip install junit-xml
|
||||||
ENV container docker
|
ENV container=docker
|
||||||
CMD ["/sbin/init"]
|
CMD ["/sbin/init"]
|
||||||
|
|
|
@ -1,18 +1,10 @@
|
||||||
FROM ubuntu:16.04
|
FROM ubuntu:16.04
|
||||||
|
|
||||||
ENV DEBIAN_FRONTEND noninteractive
|
RUN apt-get update -y && \
|
||||||
ENV container docker
|
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
||||||
|
acl \
|
||||||
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 \
|
apache2 \
|
||||||
asciidoc \
|
asciidoc \
|
||||||
acl \
|
|
||||||
bzip2 \
|
bzip2 \
|
||||||
cdbs \
|
cdbs \
|
||||||
curl \
|
curl \
|
||||||
|
@ -33,16 +25,8 @@ RUN apt-get install -y \
|
||||||
mysql-server \
|
mysql-server \
|
||||||
openssh-client \
|
openssh-client \
|
||||||
openssh-server \
|
openssh-server \
|
||||||
python-dbus \
|
|
||||||
reprepro \
|
|
||||||
rsync \
|
|
||||||
ruby \
|
|
||||||
subversion \
|
|
||||||
sudo \
|
|
||||||
unzip \
|
|
||||||
zip \
|
|
||||||
xsltproc \
|
|
||||||
python-coverage \
|
python-coverage \
|
||||||
|
python-dbus \
|
||||||
python-httplib2 \
|
python-httplib2 \
|
||||||
python-jinja2 \
|
python-jinja2 \
|
||||||
python-keyczar \
|
python-keyczar \
|
||||||
|
@ -54,20 +38,27 @@ RUN apt-get install -y \
|
||||||
python-setuptools \
|
python-setuptools \
|
||||||
python-virtualenv \
|
python-virtualenv \
|
||||||
python-wheel \
|
python-wheel \
|
||||||
|
python-yaml \
|
||||||
|
reprepro \
|
||||||
|
rsync \
|
||||||
|
ruby \
|
||||||
|
subversion \
|
||||||
|
sudo \
|
||||||
|
unzip \
|
||||||
virtualenv \
|
virtualenv \
|
||||||
python-yaml
|
xsltproc \
|
||||||
|
zip \
|
||||||
|
&& \
|
||||||
|
apt-get clean
|
||||||
|
|
||||||
# some tests assume the .deb is cached
|
|
||||||
RUN rm /etc/apt/apt.conf.d/docker-clean
|
RUN rm /etc/apt/apt.conf.d/docker-clean
|
||||||
|
RUN mkdir /etc/ansible/
|
||||||
|
RUN /bin/echo -e "[local]\nlocalhost ansible_connection=local" > /etc/ansible/hosts
|
||||||
RUN locale-gen en_US.UTF-8
|
RUN locale-gen en_US.UTF-8
|
||||||
RUN ssh-keygen -q -t rsa -N '' -f /root/.ssh/id_rsa && \
|
RUN ssh-keygen -q -t rsa -N '' -f /root/.ssh/id_rsa && \
|
||||||
cp /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys && \
|
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
|
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
|
VOLUME /sys/fs/cgroup /run/lock /run /tmp
|
||||||
RUN pip install junit-xml
|
RUN pip install junit-xml
|
||||||
|
ENV container=docker
|
||||||
CMD ["/sbin/init"]
|
CMD ["/sbin/init"]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue