Create openstack-base container

This creates and moves the dependencies for Ubuntu into a common
openstack-base container. This commit shows dramatically smaller
sizes for all non-openstack containers. The Openstack container remain
the same size.

Change-Id: I2f46420d4b9edcfddda374caddcce906fc708f6c
Partially-Implements: blueprint openstack-common-container
This commit is contained in:
Sam Yaple 2015-09-03 10:32:42 +00:00
parent 1cbfbcc48d
commit 9d3f3f28e2
19 changed files with 62 additions and 55 deletions

40
docker/base/Dockerfile.j2 Executable file → Normal file
View File

@ -188,51 +188,13 @@ RUN apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com 199369E5404BD
&& apt-get update \
&& apt-get upgrade -y \
&& apt-get dist-upgrade -y \
&& apt-get install -y --no-install-recommends \
curl \
ca-certificates \
build-essential \
python-dev \
libssl-dev \
libmariadbclient-dev \
libxslt1-dev \
libffi-dev \
libyaml-dev \
pkg-config \
&& apt-get install -y --no-install-recommends python \
&& apt-get clean \
&& sed -i "s|'purelib': '\$base/local/lib/python\$py_version_short/dist-packages',|'purelib': '\$base/lib/python\$py_version_short/dist-packages',|;s|'platlib': '\$platbase/local/lib/python\$py_version_short/dist-packages',|'platlib': '\$platbase/lib/python\$py_version_short/dist-packages',|;s|'headers': '\$base/local/include/python\$py_version_short/\$dist_name',|'headers': '\$base/include/python\$py_version_short/\$dist_name',|;s|'scripts': '\$base/local/bin',|'scripts': '\$base/bin',|;s|'data' : '\$base/local',|'data' : '\$base',|" /usr/lib/python2.7/distutils/command/install.py \
&& rm -rf /usr/lib/python2.7/site-packages \
&& ln -s dist-packages /usr/lib/python2.7/site-packages
# Endif for base_distro ubuntu,debian
{% endif %}
{% if install_type == 'source' %}
RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py \
&& python get-pip.py \
&& rm get-pip.py \
&& pip --no-cache-dir install \
python-barbicanclient \
python-ceilometerclient \
python-congressclient \
python-designateclient \
python-heatclient \
python-ironicclient \
python-magnumclient \
python-manilaclient \
python-mistralclient \
python-muranoclient \
python-saharaclient \
python-swiftclient \
python-troveclient \
python-tuskarclient \
python-zaqarclient \
python-openstackclient \
MySQL-python \
numpy
# Endif for install_type source
{% endif %}
COPY kolla-common.sh /opt/kolla/

View File

@ -1,4 +1,4 @@
FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }}
FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-openstack-base:{{ tag }}
MAINTAINER Kolla Project (https://launchpad.net/kolla)
{% if install_type == 'binary' %}

View File

@ -1,4 +1,4 @@
FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }}
FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-openstack-base:{{ tag }}
MAINTAINER Kolla Project (https://launchpad.net/kolla)
{% if install_type == 'binary' %}

View File

@ -1,4 +1,4 @@
FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }}
FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-openstack-base:{{ tag }}
MAINTAINER Kolla Project (https://launchpad.net.kolla)
{% if install_type == 'binary' %}

View File

@ -1,4 +1,4 @@
FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }}
FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-openstack-base:{{ tag }}
MAINTAINER Kolla Project (https://launchpad.net/kolla)
{% if install_type == 'binary' %}

View File

@ -1,4 +1,4 @@
FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }}
FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-openstack-base:{{ tag }}
MAINTAINER Kolla Project (https://launchpad.net/kolla)
{% if install_type == 'binary' %}

0
docker/haproxy/Dockerfile.j2 Executable file → Normal file
View File

View File

@ -1,4 +1,4 @@
FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }}
FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-openstack-base:{{ tag }}
MAINTAINER Kolla Project (https://launchpad.net/kolla)
{% if install_type == 'binary' %}

View File

@ -1,4 +1,4 @@
FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }}
FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-openstack-base:{{ tag }}
MAINTAINER Kolla Project (https://launchpad.net.kolla)
{% if install_type == 'binary' %}

View File

@ -1,4 +1,4 @@
FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }}
FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-openstack-base:{{ tag }}
MAINTAINER Kolla Project (https://launchpad.net/kolla)
{% if install_type == 'binary' %}

View File

@ -1,4 +1,4 @@
FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }}
FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-openstack-base:{{ tag }}
MAINTAINER Kolla Project (https://launchpad.net/kolla)
{% if install_type == 'binary' %}

View File

@ -1,4 +1,4 @@
FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }}
FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-openstack-base:{{ tag }}
MAINTAINER Kolla Project (https://launchpad.net/kolla)
{% if base_distro in ['fedora', 'centos', 'oraclelinux'] %}

View File

@ -1,4 +1,4 @@
FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }}
FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-openstack-base:{{ tag }}
MAINTAINER Kolla Project (https://launchpad.net/kolla)
{% if install_type == 'binary' %}

View File

@ -1,4 +1,4 @@
FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }}
FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-openstack-base:{{ tag }}
MAINTAINER Kolla Project (https://launchpad.net/kolla)
{% if install_type == 'binary' %}

View File

@ -1,4 +1,4 @@
FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }}
FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-openstack-base:{{ tag }}
MAINTAINER Kolla Project (https://launchpad.net.kolla)
{% if install_type == 'binary' %}

View File

@ -1,4 +1,4 @@
FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }}
FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-openstack-base:{{ tag }}
MAINTAINER Kolla Project (https://launchpad.net/kolla)
{% if install_type == 'binary' %}

View File

@ -0,0 +1,45 @@
FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }}
MAINTAINER Kolla Project (https://launchpad.net/kolla)
{% if install_type == 'source' %}
{% if base_distro in ['ubuntu', 'debian'] %}
RUN apt-get install -y --no-install-recommends \
curl \
ca-certificates \
build-essential \
python-dev \
libssl-dev \
libmariadbclient-dev \
libxslt1-dev \
libffi-dev \
libyaml-dev \
pkg-config \
&& apt-get clean
{% endif %}
RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py \
&& python get-pip.py \
&& rm get-pip.py \
&& pip --no-cache-dir install \
python-barbicanclient \
python-ceilometerclient \
python-congressclient \
python-designateclient \
python-heatclient \
python-ironicclient \
python-magnumclient \
python-manilaclient \
python-mistralclient \
python-muranoclient \
python-saharaclient \
python-swiftclient \
python-troveclient \
python-tuskarclient \
python-zaqarclient \
python-openstackclient \
MySQL-python \
numpy
{% endif %}

View File

@ -1,4 +1,4 @@
FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }}
FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-openstack-base:{{ tag }}
MAINTAINER Kolla Project (https://launchpad.net.kolla)
{% if install_type == 'binary' %}

View File

@ -1,4 +1,4 @@
FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }}
FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-openstack-base:{{ tag }}
MAINTAINER Kolla Project (https://launchpad.net/kolla)
{% if install_type == 'binary' %}