Merge "Use debian repos for debian base docker image"
This commit is contained in:
commit
ad71352a93
@ -193,29 +193,55 @@ RUN cat /tmp/kolla_bashrc >> /etc/bash.bashrc
|
|||||||
# This will prevent questions from being asked during the install
|
# This will prevent questions from being asked during the install
|
||||||
ENV DEBIAN_FRONTEND noninteractive
|
ENV DEBIAN_FRONTEND noninteractive
|
||||||
|
|
||||||
COPY sources.list /etc/apt/
|
COPY sources.list.{{ base_distro }} /etc/apt/sources.list
|
||||||
COPY apt_preferences /etc/apt/preferences
|
COPY apt_preferences.{{ base_distro }} /etc/apt/preferences
|
||||||
|
|
||||||
RUN apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 199369E5404BD5FC7D2FE43BCBCB082A1BB943DB \
|
{% set packages = '\
|
||||||
&& apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 391A9AA2147192839E9DB0315EDB1B62EC4926EA \
|
ca-certificates \
|
||||||
&& apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 430BDF5C56E7C94E848EE60C1C4CBDCDCD2EFD2A \
|
curl \
|
||||||
&& apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 08B73419AC32B4E966C1A330E84AC2C0460F3994 \
|
lvm2 \
|
||||||
&& apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 46095ACC8548582C1A2699A9D27D666CD88E42B4 \
|
open-iscsi \
|
||||||
|
python \
|
||||||
|
tgt'
|
||||||
|
%}
|
||||||
|
|
||||||
|
{% if base_distro == 'ubuntu' %}
|
||||||
|
{% set keys = [
|
||||||
|
'199369E5404BD5FC7D2FE43BCBCB082A1BB943DB',
|
||||||
|
'391A9AA2147192839E9DB0315EDB1B62EC4926EA',
|
||||||
|
'430BDF5C56E7C94E848EE60C1C4CBDCDCD2EFD2A',
|
||||||
|
'08B73419AC32B4E966C1A330E84AC2C0460F3994',
|
||||||
|
'46095ACC8548582C1A2699A9D27D666CD88E42B4',
|
||||||
|
] %}
|
||||||
|
{% elif base_distro == 'debian' %}
|
||||||
|
{% set keys = [
|
||||||
|
'08B73419AC32B4E966C1A330E84AC2C0460F3994',
|
||||||
|
'58118E89F3A912897C070ADBF76221572C52609D',
|
||||||
|
'0xcbcb082a1bb943db',
|
||||||
|
'D27D666CD88E42B4',
|
||||||
|
] %}
|
||||||
|
{% set packages = packages +
|
||||||
|
' sudo'
|
||||||
|
%}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
RUN true \
|
||||||
|
{% for key in keys %}
|
||||||
|
&& apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 {{ key }} \
|
||||||
|
{% endfor %}
|
||||||
&& apt-get update \
|
&& apt-get update \
|
||||||
&& apt-get upgrade -y \
|
&& apt-get -y upgrade \
|
||||||
&& apt-get dist-upgrade -y \
|
&& apt-get -y dist-upgrade \
|
||||||
&& apt-get -y install --no-install-recommends \
|
&& apt-get -y install --no-install-recommends {{ packages }} \
|
||||||
ca-certificates \
|
&& apt-get clean
|
||||||
python \
|
|
||||||
curl \
|
{% if base_distro == 'ubuntu' %}
|
||||||
open-iscsi \
|
RUN 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 \
|
||||||
tgt \
|
|
||||||
lvm2 \
|
|
||||||
&& 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 \
|
&& rm -rf /usr/lib/python2.7/site-packages \
|
||||||
&& ln -s dist-packages /usr/lib/python2.7/site-packages
|
&& ln -s dist-packages /usr/lib/python2.7/site-packages
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{# endif for base_distro ubuntu, debian #}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
COPY set_configs.py /usr/local/bin/kolla_set_configs
|
COPY set_configs.py /usr/local/bin/kolla_set_configs
|
||||||
|
23
docker/base/apt_preferences.debian
Normal file
23
docker/base/apt_preferences.debian
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
Package: *
|
||||||
|
Pin: origin "download.ceph.com"
|
||||||
|
Pin-Priority: 500
|
||||||
|
|
||||||
|
Package: *
|
||||||
|
Pin: origin "nyc2.mirrors.digitalocean.com"
|
||||||
|
Pin-Priority: 500
|
||||||
|
|
||||||
|
Package: python-rtslib
|
||||||
|
Pin: release o=Debian,a=testing,n=stretch,l=Debian
|
||||||
|
Pin-Priority: 500
|
||||||
|
|
||||||
|
Package: targetcli
|
||||||
|
Pin: release o=Debian,a=testing,n=stretch,l=Debian
|
||||||
|
Pin-Priority: 500
|
||||||
|
|
||||||
|
Package: python-configshell
|
||||||
|
Pin: release o=Debian,a=testing,n=stretch,l=Debian
|
||||||
|
Pin-Priority: 500
|
||||||
|
|
||||||
|
Package: *
|
||||||
|
Pin: release o=Debian,a=testing,n=stretch,l=Debian
|
||||||
|
Pin-Priority: -1
|
26
docker/base/sources.list.debian
Normal file
26
docker/base/sources.list.debian
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
# Default repos
|
||||||
|
deb http://httpredir.debian.org/debian jessie main
|
||||||
|
|
||||||
|
# jessie-backports
|
||||||
|
deb http://httpredir.debian.org/debian jessie-backports main contrib
|
||||||
|
|
||||||
|
# jessie-updates, previously known as 'volatile'
|
||||||
|
deb http://httpredir.debian.org/debian jessie-updates main
|
||||||
|
|
||||||
|
# debian security updates
|
||||||
|
deb http://security.debian.org jessie/updates main
|
||||||
|
|
||||||
|
# need some packages from testing not available in stable
|
||||||
|
deb http://httpredir.debian.org/debian stretch main
|
||||||
|
|
||||||
|
# Ceph repo
|
||||||
|
deb http://download.ceph.com/debian-hammer/ jessie main
|
||||||
|
|
||||||
|
# Maria DB repo
|
||||||
|
deb [arch=amd64,i386] http://nyc2.mirrors.digitalocean.com/mariadb/repo/10.0/debian jessie main
|
||||||
|
|
||||||
|
# Kibana repo
|
||||||
|
deb http://packages.elastic.co/kibana/4.4/debian stable main
|
||||||
|
|
||||||
|
# docker
|
||||||
|
deb http://apt.dockerproject.org/repo debian-jessie main
|
Loading…
Reference in New Issue
Block a user