From 22b89046f1da2c26b19862fbf95ab15684f0cc76 Mon Sep 17 00:00:00 2001 From: liangxia Date: Wed, 19 Sep 2018 09:17:29 +0800 Subject: [PATCH] URL of OKD is docs.okd.io now --- docs/builder_image.md | 2 +- docs/user_guide.md | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/builder_image.md b/docs/builder_image.md index f133b18dc..f405ade07 100644 --- a/docs/builder_image.md +++ b/docs/builder_image.md @@ -177,4 +177,4 @@ should be the following: # Additional steps ## OpenShift support -If you are intending to use this image with [OpenShift](https://github.com/openshift/origin), review and follow the OpenShift [image creation guidelines](https://docs.openshift.org/latest/creating_images/guidelines.html). +If you are intending to use this image with [OpenShift](https://github.com/openshift/origin), review and follow the OpenShift [image creation guidelines](https://docs.okd.io/latest/creating_images/guidelines.html). diff --git a/docs/user_guide.md b/docs/user_guide.md index 1a93d32c6..ed995c681 100644 --- a/docs/user_guide.md +++ b/docs/user_guide.md @@ -1,10 +1,10 @@ # Using S2I images -S2I builder images normally include [`assemble` and `run` scripts](https://docs.openshift.org/latest/creating_images/s2i.html#s2i-scripts), but the default behavior of those scripts may not be suitable for all users. This topic covers a few approaches for customizing the behavior of an S2I builder that includes default scripts. +S2I builder images normally include [`assemble` and `run` scripts](https://docs.okd.io/latest/creating_images/s2i.html#s2i-scripts), but the default behavior of those scripts may not be suitable for all users. This topic covers a few approaches for customizing the behavior of an S2I builder that includes default scripts. ## Invoking scripts embedded in an image -Typically, builder images provide their own version of the [S2I scripts](builder_image.md#s2i-scripts) that cover the most common use-cases. If these scripts do not fulfill your needs, S2I provides a way of overriding them by adding custom ones in the `.s2i/bin` directory. However, by doing this you are [completely replacing the standard scripts](https://docs.openshift.org/latest/creating_images/s2i.html#s2i-scripts). In some cases this is acceptable, but in other scenarios you may prefer to execute a few commands before (or after) the scripts while retaining the logic of the script provided in the image. In this case, it is possible to create a wrapper script that executes custom logic and delegates further work to the default script in the image. +Typically, builder images provide their own version of the [S2I scripts](builder_image.md#s2i-scripts) that cover the most common use-cases. If these scripts do not fulfill your needs, S2I provides a way of overriding them by adding custom ones in the `.s2i/bin` directory. However, by doing this you are [completely replacing the standard scripts](https://docs.okd.io/latest/creating_images/s2i.html#s2i-scripts). In some cases this is acceptable, but in other scenarios you may prefer to execute a few commands before (or after) the scripts while retaining the logic of the script provided in the image. In this case, it is possible to create a wrapper script that executes custom logic and delegates further work to the default script in the image. To determine the location of the scripts inside of the builder image, look at the value of `io.openshift.s2i.scripts-url` label. Use `docker inspect`: @@ -36,7 +36,7 @@ exit $rc The example shows a custom `assemble` script that prints the message, executes standard `assemble` script from the image and prints another message depending on the exit code of the `assemble` script. -When wrapping the `run` script, you must [use `exec` for invoking it](https://docs.openshift.org/latest/creating_images/guidelines.html#general-docker-guidelines) to ensure signals are handled properly. Unfortunately, the use of `exec` also precludes the ability to run additional commands after invoking the default image run script. +When wrapping the `run` script, you must [use `exec` for invoking it](https://docs.okd.io/latest/creating_images/guidelines.html#general-docker-guidelines) to ensure signals are handled properly. Unfortunately, the use of `exec` also precludes the ability to run additional commands after invoking the default image run script. Example of `.s2i/bin/run` script: ```bash