summaryrefslogtreecommitdiffstats
path: root/BUILD.md
diff options
context:
space:
mode:
authorPep TurrĂ³ Mauri <pep@redhat.com>2017-05-12 14:26:00 +0200
committerPep TurrĂ³ Mauri <pep@redhat.com>2017-05-12 19:03:59 +0200
commit4f95f55b60d48eabfcf69e9828e6fd655b3683c4 (patch)
treee0bb8c079c547c659d89622b701c04f63e273efe /BUILD.md
parent57185bdd2415d4bbdeb6d18dfdaea65d0c440ae1 (diff)
downloadopenshift-4f95f55b60d48eabfcf69e9828e6fd655b3683c4.tar.gz
openshift-4f95f55b60d48eabfcf69e9828e6fd655b3683c4.tar.bz2
openshift-4f95f55b60d48eabfcf69e9828e6fd655b3683c4.tar.xz
openshift-4f95f55b60d48eabfcf69e9828e6fd655b3683c4.zip
Fix container image build references
Updating some files to account for recent changes: - Commit fbadeb4 moved the location of the Dockerfiles - playbook2image is now available from the openshift org - downstream image is building with boto 2.34 Adjusting image build scripts and documentation to match these changes.
Diffstat (limited to 'BUILD.md')
-rw-r--r--BUILD.md25
1 files changed, 21 insertions, 4 deletions
diff --git a/BUILD.md b/BUILD.md
index e6541ace3..7ac0187ee 100644
--- a/BUILD.md
+++ b/BUILD.md
@@ -29,17 +29,34 @@ tito build --rpm
To build a container image of `openshift-ansible` using standalone **Docker**:
cd openshift-ansible
- docker build -t openshift/openshift-ansible .
+ docker build -f images/installer/Dockerfile -t openshift/openshift-ansible .
-Alternatively this can be built using on **OpenShift** using a [build and image stream](https://docs.openshift.org/latest/architecture/core_concepts/builds_and_image_streams.html) with this command:
+### Building on OpenShift
+
+To build an openshift-ansible image using an **OpenShift** [build and image stream](https://docs.openshift.org/latest/architecture/core_concepts/builds_and_image_streams.html) the straightforward command would be:
oc new-build docker.io/aweiteka/playbook2image~https://github.com/openshift/openshift-ansible
-The progress of the build can be monitored with:
+However: because the `Dockerfile` for this repository is not in the top level directory, and because we can't change the build context to the `images/installer` path as it would cause the build to fail, the `oc new-app` command above will create a build configuration using the *source to image* strategy, which is the default approach of the [playbook2image](https://github.com/openshift/playbook2image) base image. This does build an image successfully, but unfortunately the resulting image will be missing some customizations that are handled by the [Dockerfile](images/installer/Dockerfile) in this repo.
+
+At the time of this writing there is no straightforward option to [set the dockerfilePath](https://docs.openshift.org/latest/dev_guide/builds/build_strategies.html#dockerfile-path) of a `docker` build strategy with `oc new-build`. The alternatives to achieve this are:
+
+- Use the simple `oc new-build` command above to generate the BuildConfig and ImageStream objects, and then manually edit the generated build configuration to change its strategy to `dockerStrategy` and set `dockerfilePath` to `images/installer/Dockerfile`.
+
+- Download and pass the `Dockerfile` to `oc new-build` with the `-D` option:
+
+```
+curl -s https://raw.githubusercontent.com/openshift/openshift-ansible/master/images/installer/Dockerfile |
+ oc new-build -D - \
+ --docker-image=docker.io/aweiteka/playbook2image \
+ https://github.com/openshift/openshift-ansible
+```
+
+Once a build is started, the progress of the build can be monitored with:
oc logs -f bc/openshift-ansible
-Once built, the image will be visible in the Image Stream created by the same command:
+Once built, the image will be visible in the Image Stream created by `oc new-app`:
oc describe imagestream openshift-ansible