From 9cb2b3fc9503e41472679f439056301cd97795d3 Mon Sep 17 00:00:00 2001 From: Sam Yaple Date: Thu, 20 Aug 2015 14:31:22 +0000 Subject: [PATCH] Fix up base for ubuntu In the base we no add the sources.list with the appropriate sources from around the interwebs. We also pull in the appropriate signing keys for those packages. We adjust the dependencies as well. Change-Id: Ic7e084c0c57287945d0e7c2526f050afbbdec454 Partially-Implements: blueprint install-from-ubuntu --- docker_templates/base/Dockerfile.j2 | 46 ++++++++++++----------------- docker_templates/base/sources.list | 20 +++++++++++++ 2 files changed, 39 insertions(+), 27 deletions(-) create mode 100644 docker_templates/base/sources.list diff --git a/docker_templates/base/Dockerfile.j2 b/docker_templates/base/Dockerfile.j2 index c185b2553f..2c5777e7e6 100644 --- a/docker_templates/base/Dockerfile.j2 +++ b/docker_templates/base/Dockerfile.j2 @@ -181,38 +181,34 @@ RUN yum update -y \ # Endif for base_distro centos,fedora,oraclelinux {% elif base_distro in ['ubuntu', 'debian'] %} -RUN apt-get update \ - && apt-get install -y --no-install-recommends software-properties-common \ - && add-apt-repository cloud-archive:kilo \ +# This will prevent questions from being asked during the install +ENV DEBIAN_FRONTEND noninteractive + +COPY sources.list /etc/apt/ + +RUN apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com 199369E5404BD5FC7D2FE43BCBCB082A1BB943DB \ + && apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com 391A9AA2147192839E9DB0315EDB1B62EC4926EA \ + && apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com F78372A06FF50C80464FC1B4F7B8CEA6056E8E56 \ + && apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com 430BDF5C56E7C94E848EE60C1C4CBDCDCD2EFD2A \ + && apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com 7D5C473EB80C00FC133071068A6844A29F68104E \ && apt-get update \ && apt-get upgrade -y \ && apt-get dist-upgrade -y \ && apt-get install -y --no-install-recommends \ curl \ - openssl \ - && apt-get clean - - {% if install_type == 'source' %} - -RUN apt-get install -y --no-install-recommends \ - gcc \ - gcc-c++ \ - git \ - ldap-utils \ - libffi-dev \ - libxml2-dev \ - libxslt-dev \ - mysql-server\ - postgresql \ + ca-certificates \ + build-essential \ python-dev \ - python-oslo-policy \ - slapd \ - sqlite \ - tar \ + libssl-dev \ + python-mysqldb \ + libmariadbclient-dev \ + libxslt1-dev \ + libffi-dev \ + libyaml-dev \ + pkg-config \ && apt-get clean # Endif for install_type source - {% endif %} {% endif %} {% if install_type == 'source' %} @@ -221,10 +217,6 @@ RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py \ && python get-pip.py \ && rm get-pip.py -RUN pip install --upgrade \ - pip \ - wheel - # Endif for install_type source {% endif %} diff --git a/docker_templates/base/sources.list b/docker_templates/base/sources.list new file mode 100644 index 0000000000..331a3b1f09 --- /dev/null +++ b/docker_templates/base/sources.list @@ -0,0 +1,20 @@ +# Default repos +deb http://archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse +deb http://archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse +deb http://archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse + +# Backports have a lower priority and must be explictly installed to be used +deb http://archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse + +# We need to add the Liberty repo for the updated packages they provide. The +# main ones are qemu, libvirt, and openvswitch +deb http://ubuntu-cloud.archive.canonical.com/ubuntu trusty-updates/liberty main + +# MariaDB 10.0 repo +deb http://nyc2.mirrors.digitalocean.com/mariadb/repo/10.0/ubuntu trusty main + +# Percona repo (for xtrabackup) +deb http://repo.percona.com/apt trusty main + +# RabbitMQ repo. Despite the name, the 'testing' repo is the stable repo. +deb http://www.rabbitmq.com/debian/ testing main