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 7246e89375..8ef95eddc9 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 sysfsutils \ diff --git a/docker/nova-compute/nova-libvirt/Dockerfile b/docker/nova-compute/nova-libvirt/Dockerfile index 0a7a7439ae..7de4543f72 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 libvirtd libguestfs qemu-system-x86 \ diff --git a/docker/nova-compute/nova-network/Dockerfile b/docker/nova-compute/nova-network/Dockerfile index 79c496b968..2ee4deff43 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 f8ae9f0b64..5a10fb90bc 100755 --- a/tools/build-all-docker-images +++ b/tools/build-all-docker-images @@ -76,6 +76,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 f174a11f4d..852c2dbf41 100755 --- a/tools/build-docker-image +++ b/tools/build-docker-image @@ -90,6 +90,10 @@ fi TMPDIR=$(mktemp -d /tmp/kolla-build.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"