From 0764fd7dea3f56627bb42e285cfb818cce08229e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Andr=C3=A9?= Date: Thu, 26 Feb 2015 15:00:42 +0900 Subject: [PATCH] Allow changing base image By changing the PREFIX variable in the .buildconf one is now able to build docker images from different bases. For example, add the following line to your .buildconf file to build CentOS based images: PREFIX=centos-rdo- Default base image is Fedora. For now only RH family is supported. Additionally, changing the namespace either with the NAMESPACE variable in .buildconf or via --namespace commandline option now changes the source namespace as well from the default kollaglue one. Implements: blueprint multi-baseos Co-Authored-By: Steven Dake Change-Id: I3964cd2292789ea883a1f2d2738a5731a4fff49b --- docker/barbican/Dockerfile | 2 +- docker/ceilometer/ceilometer-alarm/Dockerfile | 2 +- docker/ceilometer/ceilometer-api/Dockerfile | 2 +- docker/ceilometer/ceilometer-base/Dockerfile | 2 +- .../ceilometer/ceilometer-central/Dockerfile | 2 +- .../ceilometer-collector/Dockerfile | 2 +- .../ceilometer/ceilometer-compute/Dockerfile | 2 +- .../ceilometer-notification/Dockerfile | 2 +- docker/cinder/Dockerfile | 2 +- docker/glance/glance-api/Dockerfile | 2 +- docker/glance/glance-base/Dockerfile | 2 +- docker/glance/glance-registry/Dockerfile | 2 +- docker/heat/heat-api/Dockerfile | 2 +- docker/heat/heat-base/Dockerfile | 2 +- docker/heat/heat-engine/Dockerfile | 2 +- docker/horizon/Dockerfile | 2 +- docker/keystone/Dockerfile | 2 +- docker/mariadb/Dockerfile | 2 +- docker/mongodb/Dockerfile | 2 +- docker/neutron/agents/dhcp/Dockerfile | 2 +- docker/neutron/agents/l3/Dockerfile | 2 +- docker/neutron/agents/linux-bridge/Dockerfile | 2 +- docker/neutron/agents/metadata/Dockerfile | 2 +- docker/neutron/neutron-base/Dockerfile | 2 +- docker/neutron/neutron-server/Dockerfile | 2 +- docker/nova-base/Dockerfile | 2 +- docker/nova-compute/nova-compute/Dockerfile | 2 +- docker/nova-compute/nova-libvirt/Dockerfile | 2 +- docker/nova-compute/nova-network/Dockerfile | 2 +- docker/nova-controller/nova-api/Dockerfile | 2 +- .../nova-controller/nova-conductor/Dockerfile | 2 +- .../nova-controller/nova-scheduler/Dockerfile | 2 +- docker/rabbitmq/Dockerfile | 2 +- docker/swift/swift-account/Dockerfile | 2 +- docker/swift/swift-base/Dockerfile | 2 +- docker/swift/swift-container/Dockerfile | 2 +- docker/swift/swift-object/Dockerfile | 2 +- docker/swift/swift-proxy-server/Dockerfile | 2 +- docker/zaqar/Dockerfile | 2 +- docs/image-building.md | 38 ++++++++++--------- tools/build-all-docker-images | 2 + tools/build-docker-image | 4 ++ 42 files changed, 65 insertions(+), 57 deletions(-) diff --git a/docker/barbican/Dockerfile b/docker/barbican/Dockerfile index 58759fb766..3c7493bd21 100644 --- a/docker/barbican/Dockerfile +++ b/docker/barbican/Dockerfile @@ -1,4 +1,4 @@ -FROM kollaglue/fedora-rdo-base +FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%base MAINTAINER Kolla Project (https://launchpad.net/kolla) ADD ./start.sh /start.sh diff --git a/docker/ceilometer/ceilometer-alarm/Dockerfile b/docker/ceilometer/ceilometer-alarm/Dockerfile index 7bcbf30ae6..fc8d7742ec 100644 --- a/docker/ceilometer/ceilometer-alarm/Dockerfile +++ b/docker/ceilometer/ceilometer-alarm/Dockerfile @@ -1,4 +1,4 @@ -FROM kollaglue/fedora-rdo-ceilometer-base +FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%ceilometer-base MAINTAINER Kolla Project (https://launchpad.net/kolla) RUN yum install -y openstack-ceilometer-alarm && yum clean all diff --git a/docker/ceilometer/ceilometer-api/Dockerfile b/docker/ceilometer/ceilometer-api/Dockerfile index 29a46b39ff..a9894e2bdf 100644 --- a/docker/ceilometer/ceilometer-api/Dockerfile +++ b/docker/ceilometer/ceilometer-api/Dockerfile @@ -1,4 +1,4 @@ -FROM kollaglue/fedora-rdo-ceilometer-base +FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%ceilometer-base MAINTAINER Kolla Project (https://launchpad.net/kolla) RUN yum install -y openstack-ceilometer-api && yum clean all diff --git a/docker/ceilometer/ceilometer-base/Dockerfile b/docker/ceilometer/ceilometer-base/Dockerfile index c166027cdf..ba2506e3a2 100644 --- a/docker/ceilometer/ceilometer-base/Dockerfile +++ b/docker/ceilometer/ceilometer-base/Dockerfile @@ -1,4 +1,4 @@ -FROM kollaglue/fedora-rdo-base +FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%base MAINTAINER Kolla Project (https://launchpad.net/kolla) RUN mkdir -p /opt/kolla diff --git a/docker/ceilometer/ceilometer-central/Dockerfile b/docker/ceilometer/ceilometer-central/Dockerfile index a20c6712c4..18ed633d69 100644 --- a/docker/ceilometer/ceilometer-central/Dockerfile +++ b/docker/ceilometer/ceilometer-central/Dockerfile @@ -1,4 +1,4 @@ -FROM kollaglue/fedora-rdo-ceilometer-base +FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%ceilometer-base MAINTAINER Kolla Project (https://launchpad.net/kolla) RUN yum install -y openstack-ceilometer-central && yum clean all diff --git a/docker/ceilometer/ceilometer-collector/Dockerfile b/docker/ceilometer/ceilometer-collector/Dockerfile index 4630a3cdfc..b654b2622f 100644 --- a/docker/ceilometer/ceilometer-collector/Dockerfile +++ b/docker/ceilometer/ceilometer-collector/Dockerfile @@ -1,4 +1,4 @@ -FROM kollaglue/fedora-rdo-ceilometer-base +FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%ceilometer-base MAINTAINER Kolla Project (https://launchpad.net/kolla) RUN yum install -y openstack-ceilometer-collector && yum clean all diff --git a/docker/ceilometer/ceilometer-compute/Dockerfile b/docker/ceilometer/ceilometer-compute/Dockerfile index 07b38bcc51..4b03c4f004 100644 --- a/docker/ceilometer/ceilometer-compute/Dockerfile +++ b/docker/ceilometer/ceilometer-compute/Dockerfile @@ -1,4 +1,4 @@ -FROM kollaglue/fedora-rdo-ceilometer-base +FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%ceilometer-base MAINTAINER Kolla Project (https://launchpad.net/kolla) RUN yum install -y openstack-ceilometer-compute python-ceilometerclient python-pecan \ diff --git a/docker/ceilometer/ceilometer-notification/Dockerfile b/docker/ceilometer/ceilometer-notification/Dockerfile index 385a27248d..1f8795645c 100644 --- a/docker/ceilometer/ceilometer-notification/Dockerfile +++ b/docker/ceilometer/ceilometer-notification/Dockerfile @@ -1,4 +1,4 @@ -FROM kollaglue/fedora-rdo-ceilometer-base +FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%ceilometer-base MAINTAINER Kolla Project (https://launchpad.net/kolla) RUN yum install -y openstack-ceilometer-notification && yum clean all diff --git a/docker/cinder/Dockerfile b/docker/cinder/Dockerfile index 1df804cd9a..52f2119911 100644 --- a/docker/cinder/Dockerfile +++ b/docker/cinder/Dockerfile @@ -1,4 +1,4 @@ -FROM kollaglue/fedora-rdo-base +FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%base MAINTAINER Kolla Project (https://launchpad.net/kolla) RUN yum -y install openstack-cinder && yum clean all diff --git a/docker/glance/glance-api/Dockerfile b/docker/glance/glance-api/Dockerfile index d416f15a8d..0ce10935ce 100644 --- a/docker/glance/glance-api/Dockerfile +++ b/docker/glance/glance-api/Dockerfile @@ -1,4 +1,4 @@ -FROM kollaglue/fedora-rdo-glance-base +FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%glance-base MAINTAINER Kolla Project (https://launchpad.net/kolla) VOLUME /var/lib/glance diff --git a/docker/glance/glance-base/Dockerfile b/docker/glance/glance-base/Dockerfile index 0cc1d2f558..2998cd19c9 100644 --- a/docker/glance/glance-base/Dockerfile +++ b/docker/glance/glance-base/Dockerfile @@ -1,4 +1,4 @@ -FROM kollaglue/fedora-rdo-base +FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%base MAINTAINER Kolla Project (https://launchpad.net/kolla) RUN yum -y install openstack-glance ; yum clean all diff --git a/docker/glance/glance-registry/Dockerfile b/docker/glance/glance-registry/Dockerfile index c35d275f64..fc8442516f 100644 --- a/docker/glance/glance-registry/Dockerfile +++ b/docker/glance/glance-registry/Dockerfile @@ -1,4 +1,4 @@ -FROM kollaglue/fedora-rdo-glance-base +FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%glance-base MAINTAINER Kolla Project (https://launchpad.net/kolla) ADD ./start.sh /start.sh diff --git a/docker/heat/heat-api/Dockerfile b/docker/heat/heat-api/Dockerfile index 36a9436b74..b89f76914d 100644 --- a/docker/heat/heat-api/Dockerfile +++ b/docker/heat/heat-api/Dockerfile @@ -1,4 +1,4 @@ -FROM kollaglue/fedora-rdo-heat-base +FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%heat-base MAINTAINER Kolla Project (https://launchpad.net/kolla) # TODO: configure cfn and cloudwatch diff --git a/docker/heat/heat-base/Dockerfile b/docker/heat/heat-base/Dockerfile index 828895db8f..4e5646b554 100644 --- a/docker/heat/heat-base/Dockerfile +++ b/docker/heat/heat-base/Dockerfile @@ -1,4 +1,4 @@ -FROM kollaglue/fedora-rdo-base +FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%base MAINTAINER Kolla Project (https://launchpad.net/kolla) RUN mkdir -p /opt/kolla diff --git a/docker/heat/heat-engine/Dockerfile b/docker/heat/heat-engine/Dockerfile index be871e98de..f678f84e7c 100644 --- a/docker/heat/heat-engine/Dockerfile +++ b/docker/heat/heat-engine/Dockerfile @@ -1,4 +1,4 @@ -FROM kollaglue/fedora-rdo-heat-base +FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%heat-base MAINTAINER Kolla Project (https://launchpad.net/kolla) RUN yum -y install \ diff --git a/docker/horizon/Dockerfile b/docker/horizon/Dockerfile index 71785aad0e..d05d07f2ae 100644 --- a/docker/horizon/Dockerfile +++ b/docker/horizon/Dockerfile @@ -1,4 +1,4 @@ -FROM kollaglue/fedora-rdo-base +FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%base MAINTAINER Kolla Project (https://launchpad.net/kolla) RUN yum -y install \ diff --git a/docker/keystone/Dockerfile b/docker/keystone/Dockerfile index 8bd415cc94..e4ad8941a5 100644 --- a/docker/keystone/Dockerfile +++ b/docker/keystone/Dockerfile @@ -1,4 +1,4 @@ -FROM kollaglue/fedora-rdo-base +FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%base MAINTAINER Kolla Project (https://launchpad.net/kolla) #Install required packages diff --git a/docker/mariadb/Dockerfile b/docker/mariadb/Dockerfile index e0dd610186..27943230c1 100644 --- a/docker/mariadb/Dockerfile +++ b/docker/mariadb/Dockerfile @@ -1,4 +1,4 @@ -FROM kollaglue/fedora-rdo-base +FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%base MAINTAINER Kolla Project (https://launchpad.net/kolla) RUN yum -y install mariadb-galera-server; yum clean all diff --git a/docker/mongodb/Dockerfile b/docker/mongodb/Dockerfile index 438a2919c9..357378f4e0 100644 --- a/docker/mongodb/Dockerfile +++ b/docker/mongodb/Dockerfile @@ -1,4 +1,4 @@ -FROM kollaglue/fedora-rdo-base +FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%base MAINTAINER Kolla Project (https://launchpad.net/kolla) RUN yum -y install mongodb mongodb-server; yum clean all diff --git a/docker/neutron/agents/dhcp/Dockerfile b/docker/neutron/agents/dhcp/Dockerfile index 082dfd9390..261d4f40df 100644 --- a/docker/neutron/agents/dhcp/Dockerfile +++ b/docker/neutron/agents/dhcp/Dockerfile @@ -1,4 +1,4 @@ -FROM kollaglue/fedora-rdo-neutron-base +FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%neutron-base MAINTAINER Kolla Project (https://launchpad.net/kolla) # Install required packages diff --git a/docker/neutron/agents/l3/Dockerfile b/docker/neutron/agents/l3/Dockerfile index 4ff41c1bfe..bf635371e0 100644 --- a/docker/neutron/agents/l3/Dockerfile +++ b/docker/neutron/agents/l3/Dockerfile @@ -1,4 +1,4 @@ -FROM kollaglue/fedora-rdo-neutron-base +FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%neutron-base MAINTAINER Kolla Project (https://launchpad.net/kolla) # Install required packages diff --git a/docker/neutron/agents/linux-bridge/Dockerfile b/docker/neutron/agents/linux-bridge/Dockerfile index 0a8a9cbff7..7f2d113208 100644 --- a/docker/neutron/agents/linux-bridge/Dockerfile +++ b/docker/neutron/agents/linux-bridge/Dockerfile @@ -1,4 +1,4 @@ -FROM kollaglue/fedora-rdo-neutron-base +FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%neutron-base MAINTAINER Kolla Project (https://launchpad.net/kolla) # Install required packages diff --git a/docker/neutron/agents/metadata/Dockerfile b/docker/neutron/agents/metadata/Dockerfile index 4ff41c1bfe..bf635371e0 100644 --- a/docker/neutron/agents/metadata/Dockerfile +++ b/docker/neutron/agents/metadata/Dockerfile @@ -1,4 +1,4 @@ -FROM kollaglue/fedora-rdo-neutron-base +FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%neutron-base MAINTAINER Kolla Project (https://launchpad.net/kolla) # Install required packages diff --git a/docker/neutron/neutron-base/Dockerfile b/docker/neutron/neutron-base/Dockerfile index 33bcc371fa..362e5c28dd 100644 --- a/docker/neutron/neutron-base/Dockerfile +++ b/docker/neutron/neutron-base/Dockerfile @@ -1,4 +1,4 @@ -FROM kollaglue/fedora-rdo-base +FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%base MAINTAINER Kolla Project (https://launchpad.net/kolla) RUN yum -y install openstack-neutron-ml2 ; yum clean all diff --git a/docker/neutron/neutron-server/Dockerfile b/docker/neutron/neutron-server/Dockerfile index 02e2e809fd..852d3c44d2 100644 --- a/docker/neutron/neutron-server/Dockerfile +++ b/docker/neutron/neutron-server/Dockerfile @@ -1,4 +1,4 @@ -FROM kollaglue/fedora-rdo-neutron-base +FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%neutron-base MAINTAINER Kolla Project (https://launchpad.net/kolla) #Install required packages diff --git a/docker/nova-base/Dockerfile b/docker/nova-base/Dockerfile index 06c205f44e..efd260cda0 100644 --- a/docker/nova-base/Dockerfile +++ b/docker/nova-base/Dockerfile @@ -1,4 +1,4 @@ -FROM kollaglue/fedora-rdo-base +FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%base MAINTAINER Kolla Project (https://launchpad.net/kolla) RUN yum -y install openstack-nova-common \ diff --git a/docker/nova-compute/nova-compute/Dockerfile b/docker/nova-compute/nova-compute/Dockerfile index 41ef0f84e0..8a2a544c0e 100644 --- a/docker/nova-compute/nova-compute/Dockerfile +++ b/docker/nova-compute/nova-compute/Dockerfile @@ -1,4 +1,4 @@ -FROM kollaglue/fedora-rdo-nova-base +FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%nova-base MAINTAINER Kolla Project (https://launchpad.net/kolla) RUN yum -y install openstack-nova-compute \ diff --git a/docker/nova-compute/nova-libvirt/Dockerfile b/docker/nova-compute/nova-libvirt/Dockerfile index aa49fcb7cf..991a5a1f1f 100644 --- a/docker/nova-compute/nova-libvirt/Dockerfile +++ b/docker/nova-compute/nova-libvirt/Dockerfile @@ -1,4 +1,4 @@ -FROM kollaglue/fedora-rdo-base +FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%base MAINTAINER Kolla Project (https://launchpad.net/kolla) RUN yum -y install libvirt-daemon-driver-* libvirt-daemon libvirt-daemon-kvm qemu-kvm && yum clean all diff --git a/docker/nova-compute/nova-network/Dockerfile b/docker/nova-compute/nova-network/Dockerfile index 175ea0a68b..8210927153 100644 --- a/docker/nova-compute/nova-network/Dockerfile +++ b/docker/nova-compute/nova-network/Dockerfile @@ -1,4 +1,4 @@ -FROM kollaglue/fedora-rdo-nova-base +FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%nova-base MAINTAINER Kolla Project (https://launchpad.net/kolla) RUN yum -y install openstack-nova-network \ diff --git a/docker/nova-controller/nova-api/Dockerfile b/docker/nova-controller/nova-api/Dockerfile index b20bd4547a..2ac871dadd 100644 --- a/docker/nova-controller/nova-api/Dockerfile +++ b/docker/nova-controller/nova-api/Dockerfile @@ -1,4 +1,4 @@ -FROM kollaglue/fedora-rdo-nova-base +FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%nova-base MAINTAINER Kolla Project (https://launchpad.net/kolla) RUN yum -y install \ diff --git a/docker/nova-controller/nova-conductor/Dockerfile b/docker/nova-controller/nova-conductor/Dockerfile index 4d7502d419..d2bb00a820 100644 --- a/docker/nova-controller/nova-conductor/Dockerfile +++ b/docker/nova-controller/nova-conductor/Dockerfile @@ -1,4 +1,4 @@ -FROM kollaglue/fedora-rdo-nova-base +FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%nova-base MAINTAINER Kolla Project (https://launchpad.net/kolla) RUN yum -y install \ diff --git a/docker/nova-controller/nova-scheduler/Dockerfile b/docker/nova-controller/nova-scheduler/Dockerfile index 14b49ba0a5..5190b10f6a 100644 --- a/docker/nova-controller/nova-scheduler/Dockerfile +++ b/docker/nova-controller/nova-scheduler/Dockerfile @@ -1,4 +1,4 @@ -FROM kollaglue/fedora-rdo-nova-base +FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%nova-base MAINTAINER Kolla Project (https://launchpad.net/kolla) RUN yum -y install \ diff --git a/docker/rabbitmq/Dockerfile b/docker/rabbitmq/Dockerfile index a4389598af..977cdd23ad 100644 --- a/docker/rabbitmq/Dockerfile +++ b/docker/rabbitmq/Dockerfile @@ -1,4 +1,4 @@ -FROM kollaglue/fedora-rdo-base +FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%base MAINTAINER Kolla Project (https://launchpad.net/kolla) # Install required packages diff --git a/docker/swift/swift-account/Dockerfile b/docker/swift/swift-account/Dockerfile index eefaecdb73..c3fe8d87aa 100644 --- a/docker/swift/swift-account/Dockerfile +++ b/docker/swift/swift-account/Dockerfile @@ -1,4 +1,4 @@ -FROM kollaglue/fedora-rdo-swift-base +FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%swift-base MAINTAINER Kolla Project (https://launchpad.net/kolla) ADD ./start.sh /start.sh diff --git a/docker/swift/swift-base/Dockerfile b/docker/swift/swift-base/Dockerfile index 80be78e9ce..965d65226b 100644 --- a/docker/swift/swift-base/Dockerfile +++ b/docker/swift/swift-base/Dockerfile @@ -1,4 +1,4 @@ -FROM kollaglue/fedora-rdo-base +FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%base MAINTAINER Kolla Project (https://launchpad.net/kolla) RUN yum -y install openstack-utils openstack-swift && yum clean all diff --git a/docker/swift/swift-container/Dockerfile b/docker/swift/swift-container/Dockerfile index eefaecdb73..c3fe8d87aa 100644 --- a/docker/swift/swift-container/Dockerfile +++ b/docker/swift/swift-container/Dockerfile @@ -1,4 +1,4 @@ -FROM kollaglue/fedora-rdo-swift-base +FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%swift-base MAINTAINER Kolla Project (https://launchpad.net/kolla) ADD ./start.sh /start.sh diff --git a/docker/swift/swift-object/Dockerfile b/docker/swift/swift-object/Dockerfile index eefaecdb73..c3fe8d87aa 100644 --- a/docker/swift/swift-object/Dockerfile +++ b/docker/swift/swift-object/Dockerfile @@ -1,4 +1,4 @@ -FROM kollaglue/fedora-rdo-swift-base +FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%swift-base MAINTAINER Kolla Project (https://launchpad.net/kolla) ADD ./start.sh /start.sh diff --git a/docker/swift/swift-proxy-server/Dockerfile b/docker/swift/swift-proxy-server/Dockerfile index eefaecdb73..c3fe8d87aa 100644 --- a/docker/swift/swift-proxy-server/Dockerfile +++ b/docker/swift/swift-proxy-server/Dockerfile @@ -1,4 +1,4 @@ -FROM kollaglue/fedora-rdo-swift-base +FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%swift-base MAINTAINER Kolla Project (https://launchpad.net/kolla) ADD ./start.sh /start.sh diff --git a/docker/zaqar/Dockerfile b/docker/zaqar/Dockerfile index fa37fa07be..dc4c7c442d 100644 --- a/docker/zaqar/Dockerfile +++ b/docker/zaqar/Dockerfile @@ -1,4 +1,4 @@ -FROM kollaglue/fedora-rdo-base +FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%base MAINTAINER Kolla Project (https://launchpad.net/kolla) RUN curl -O https://repos.fedorapeople.org/repos/openstack/openstack-juno/fedora-21/openstack-zaqar-2014.2-1.fc22.noarch.rpm diff --git a/docs/image-building.md b/docs/image-building.md index e3deef7811..5e8ad3cc19 100644 --- a/docs/image-building.md +++ b/docs/image-building.md @@ -37,21 +37,6 @@ commands: $ docker run kollaglue/fedora-rdo-keystone:76a1602 -Or in your kubernetes configurations: - - "containers": [{ - "name": "keystone", - "image": "kollaglue/fedora-rdo-keystone:76a1602", - "ports": [ - {"containerPort": 5000}, - {"containerPort": 35357} - ], - "env": [ - {"name": "DB_ROOT_PASSWORD", "value": "password"}, - {"name": "KEYSTONE_ADMIN_TOKEN", "value": "ADMINTOKEN"} - ] - }] - ## Building releases To build into the `latest` tag, add `--release`: @@ -62,14 +47,31 @@ Or to build and push: $ ./build --push --release +## Build all images at once + +The `build-all-docker-images` script in the tools directory is a wrapper for +the `build-docker-image` that builds all images, as the name suggests, in the +correct order. It responds to the same options as `build-docker-image` with the +additional `--from` and `--to` options that allows building only images that +have changed between the specified git revisions. + +For example, to build all images contained in docker directory and push new release: + + $ tools/build-all-docker-images --release --push + +To build only images modified in test-branch along with their children: + + $ tools/build-all-docker-images --from master --to test-branch + ## Configuration The `build-docker-image` script will look for a file named `.buildconf` -in your current directory and in the top level of the repository. You +in the image directory and in the top level of the repository. You can use this to set defaults, such as: NAMESPACE=larsks + PREFIX=centos-rdo- -This setting would cause all images to be tagged into the `larsks/` -namespace. +This setting would cause images to be tagged into the `larsks/` +namespace and use CentOS as base image instead of the default Fedora. diff --git a/tools/build-all-docker-images b/tools/build-all-docker-images index 2780d50e88..d49d0ac923 100755 --- a/tools/build-all-docker-images +++ b/tools/build-all-docker-images @@ -70,6 +70,8 @@ function init_image { local image="${NAMESPACE:+${NAMESPACE}/}${PREFIX}${img_dir##*/}" local base_image=$(cat $img_dir/Dockerfile | gawk 'match($0, /^\s*FROM\s+(\S+)/, matches) {print matches[1]}' ) + base_image=${base_image//%%KOLLA_NAMESPACE%%/$NAMESPACE} + base_image=${base_image//%%KOLLA_PREFIX%%/$PREFIX} img_dirs[$image]=$img_dir dependency[$image]=$base_image diff --git a/tools/build-docker-image b/tools/build-docker-image index 82d210d0ce..fae5cab987 100755 --- a/tools/build-docker-image +++ b/tools/build-docker-image @@ -90,6 +90,10 @@ fi TMPDIR=$(mktemp -d /tmp/output.XXXXXXXXXX) cp -aL $IMGDIR/* $TMPDIR +# Use an extension for in-place editing for portability, as GNU and BSD +# versions of sed behave differently otherwise +sed -i.bak "s/%%KOLLA_NAMESPACE%%/${NAMESPACE}/g" $TMPDIR/Dockerfile +sed -i.bak "s/%%KOLLA_PREFIX%%/${PREFIX}/g" $TMPDIR/Dockerfile if ! docker build ${BUILDFLAGS} -t "$FULLIMAGE" $TMPDIR; then echo "ERROR: failed to build $FULLIMAGE"