From 0764fd7dea3f56627bb42e285cfb818cce08229e Mon Sep 17 00:00:00 2001 From: Martin André Date: Thu, 26 Feb 2015 15:00:42 +0900 Subject: 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 --- docs/image-building.md | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) (limited to 'docs') diff --git a/docs/image-building.md b/docs/image-building.md index e3deef781..5e8ad3cc1 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. -- cgit v1.2.3