Skip to content

Commit 98bf719

Browse files
Merge pull request openshift#2391 from vikram-redhat/master
Migration: Master Creating Images
2 parents a4d6165 + 7ff1c59 commit 98bf719

File tree

6 files changed

+30
-28
lines changed

6 files changed

+30
-28
lines changed

creating_images/custom.adoc

+5-5
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ toc::[]
1313
== Overview
1414
By allowing you to define a specific builder image responsible for the entire
1515
build process, {product-title}'s
16-
link:../dev_guide/builds.html#custom-strategy-options[Custom build strategy] was
16+
xref:../dev_guide/builds.adoc#custom-strategy-options[Custom build strategy] was
1717
designed to fill a gap created with the increased popularity of creating Docker
1818
images. When there is a requirement for a build to still produce individual
1919
artifacts (packages, JARs, WARs, installable ZIPs, and base images, for
@@ -48,10 +48,10 @@ variables with the information needed to proceed with the build:
4848

4949
|`*BUILD*`
5050
|The entire serialized JSON of the `*Build*`
51-
link:../rest_api/openshift_v1.html#v1-build[object definition]. If you need to
51+
xref:../rest_api/openshift_v1.adoc#v1-build[object definition]. If you need to
5252
use a specific API version for serialization, you can set the
5353
`*buildAPIVersion*` parameter in the
54-
link:../dev_guide/builds.html#custom-strategy-options[custom strategy
54+
xref:../dev_guide/builds.adoc#custom-strategy-options[custom strategy
5555
specification] of the build configuration.
5656

5757
|`*SOURCE_REPOSITORY*`
@@ -101,10 +101,10 @@ Although Custom builder image authors have great flexibility in defining the
101101
build process, your builder image must still adhere to the following required
102102
steps necessary for seamlessly running a build inside of {product-title}:
103103

104-
. Read the `*Build*` link:../rest_api/openshift_v1.html#v1-build[object
104+
. Read the `*Build*` xref:../rest_api/openshift_v1.adoc#v1-build[object
105105
definition], which contains all the necessary information about input parameters
106106
for the build.
107107
. Run the build process.
108108
. If your build produces an image, push it to the build's
109-
link:../rest_api/openshift_v1.html#v1-buildoutput[output location] if it is
109+
xref:../rest_api/openshift_v1.adoc#v1-buildoutput[output location] if it is
110110
defined. Other output locations can be passed with environment variables.

creating_images/guidelines.adoc

+11-11
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ It is best to avoid setting default passwords. Many people will extend the image
186186
and forget to remove or change the default password. This can lead to security
187187
issues if a user in production is assigned a well-known password. Passwords
188188
should be configurable using an environment variable instead. See the
189-
link:#use-env-vars[Using Environment Variables for Configuration] topic for more
189+
xref:use-env-vars[Using Environment Variables for Configuration] topic for more
190190
information.
191191

192192
If you do choose to set a default password, ensure that an appropriate warning
@@ -261,7 +261,7 @@ For example, this https://github.com/openshift/sti-python[Python image]
261261
defines S2I scripts for building various versions of Python applications.
262262

263263
For more details about how to write S2I scripts for your image, see the
264-
link:s2i.html[S2I Requirements] topic.
264+
xref:s2i.adoc#creating-images-s2i[S2I Requirements] topic.
265265

266266
[[use-uid]]
267267
*Support Arbitrary User IDs*
@@ -343,7 +343,7 @@ validate the authority the image is attempting to run with and prevent running
343343
images that are trying to run as root, because running containers as a
344344
privileged user exposes
345345
ifdef::openshift-enterprise,openshift-origin[]
346-
link:../install_config/install/prerequisites.html#security-warning[potential
346+
xref:../install_config/install/prerequisites.adoc#security-warning[potential
347347
security holes].
348348
endif::[]
349349
ifdef::openshift-dedicated[]
@@ -358,11 +358,11 @@ ifdef::openshift-enterprise,openshift-origin[]
358358
If your S2I image does not include a *USER* declaration with a numeric user,
359359
your builds will fail by default. In order to allow images that use either named
360360
users or the root (*0*) user to build in {product-title}, you can
361-
link:../admin_guide/manage_scc.html#grant-access-to-the-privileged-scc[add the
361+
xref:../admin_guide/manage_scc.adoc#grant-access-to-the-privileged-scc[add the
362362
project's builder service account]
363363
(*system:serviceaccount:<your-project>:builder*) to the *privileged* security
364364
context constraint (SCC). Alternatively, you can allow all images to
365-
link:../admin_guide/manage_scc.html#enable-images-to-run-with-user-in-the-dockerfile[run
365+
xref:../admin_guide/manage_scc.adoc#enable-images-to-run-with-user-in-the-dockerfile[run
366366
as any user].
367367
====
368368
endif::[]
@@ -373,7 +373,7 @@ endif::[]
373373
For cases where your image needs to communicate with a service provided by
374374
another image, such as a web front end image that needs to access a database
375375
image to store and retrieve data, your image should consume an {product-title}
376-
link:../architecture/core_concepts/pods_and_services.html#services[service].
376+
xref:../architecture/core_concepts/pods_and_services.adoc#services[service].
377377
Services provide a static endpoint for access which does not change as
378378
containers are stopped, started, or moved. In addition, services provide load
379379
balancing for requests.
@@ -422,7 +422,7 @@ volumes that would be mounted into the container at runtime. However, if you
422422
elect to do it this way you must ensure that your image provides clear error
423423
messages on startup when the necessary volume or configuration is not present.
424424

425-
This topic is related to the link:#use-services[Using Services for Inter-image
425+
This topic is related to the xref:use-services[Using Services for Inter-image
426426
Communication] topic in that configuration like datasources should be defined in
427427
terms of environment variables that provide the service endpoint information.
428428
This allows an application to dynamically consume a datasource service that is
@@ -449,7 +449,7 @@ allowing {product-title} to create a better experience for developers using your
449449
image. For example, you can add metadata to provide helpful descriptions of your
450450
image, or offer suggestions on other images that may also be needed.
451451

452-
See the link:metadata.html[Image Metadata] topic for more information on
452+
See the xref:metadata.adoc#creating-images-metadata[Image Metadata] topic for more information on
453453
supported metadata and how to define them.
454454

455455
*Clustering*
@@ -478,18 +478,18 @@ running container and retrieve or view the log file.
478478
*Liveness and Readiness Probes*
479479

480480
Document example
481-
link:../dev_guide/application_health.html#container-health-checks-using-probes[liveness
481+
xref:../dev_guide/application_health.adoc#container-health-checks-using-probes[liveness
482482
and readiness probes] that can be used with your image. These probes will allow
483483
users to deploy your image with confidence that traffic will not be routed to
484484
the container until it is prepared to handle it, and that the container will be
485485
restarted if the process gets into an unhealthy state.
486486

487487
*Templates*
488488

489-
Consider providing an example link:../dev_guide/templates.html[template] with
489+
Consider providing an example xref:../dev_guide/templates.adoc#dev-guide-templates[template] with
490490
your image. A template will give users an easy way to quickly get your image
491491
deployed with a working configuration. Your template should include the
492-
link:../dev_guide/application_health.html#container-health-checks-using-probes[liveness
492+
xref:../dev_guide/application_health.adoc#container-health-checks-using-probes[liveness
493493
and readiness probes] you documented with the image, for completeness.
494494

495495

creating_images/index.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@
99
This guide provides best practices on writing and testing Docker images that can be used on {product-title}.
1010
ifdef::openshift-enterprise,openshift-origin[]
1111
Once you have created an image, you can push it to
12-
the link:../install_config/install/docker_registry.html[internal registry].
12+
the xref:../install_config/install/docker_registry.adoc#install-config-install-docker-registry[internal registry].
1313
endif::[]

creating_images/s2i.adoc

+5-5
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@
1111
toc::[]
1212

1313
== Overview
14-
link:../architecture/core_concepts/builds_and_image_streams.html#source-build[Source-to-Image
14+
xref:../architecture/core_concepts/builds_and_image_streams.adoc#source-build[Source-to-Image
1515
(S2I)] is a framework that makes it easy to write images that take application
1616
source code as an input and produce a new image that runs the assembled
1717
application as output.
1818

1919
The main advantage of using S2I for building reproducible Docker images is the
2020
ease of use for developers. As a builder image author, you must understand two
2121
basic concepts in order for your images to provide the best possible S2I performance:
22-
link:#build-process[the build process] and link:#s2i-scripts[S2I scripts].
22+
xref:build-process[the build process] and xref:s2i-scripts[S2I scripts].
2323

2424
[[build-process]]
2525

@@ -126,7 +126,7 @@ image is working correctly. The proposed flow of that process is:
126126
. Run `s2i build` again to verify the *_save-artifacts_* and *_assemble_* scripts save and restore artifacts functionality. (optional)
127127
. Run the image to verify the test application is working.
128128

129-
See the link:s2i_testing.html[Testing S2I Images] topic for more information.
129+
See the xref:s2i_testing.adoc#creating-images-s2i-testing[Testing S2I Images] topic for more information.
130130

131131
NOTE: The suggested location to put the test application built by your
132132
*_test/run_* script is the *_test/test-app_* directory in your image repository.
@@ -218,11 +218,11 @@ See the https://docs.docker.com/reference/builder/#onbuild[Docker documentation]
218218
for more information on `ONBUILD`.
219219

220220
Upon startup, S2I detects whether the builder image contains `sh` and `tar` binaries
221-
which are necessary for the S2I process to inject build inputs. If the builder image
221+
which are necessary for the S2I process to inject build inputs. If the builder image
222222
does not contain these prerequisites, it will attempt to instead perform a Docker build
223223
to layer the inputs. If the builder image includes `ONBUILD` instructions, S2I
224224
will instead fail the build because the `ONBUILD` instructions would be executed
225-
during the layering process, and that equate to performing a generic docker
225+
during the layering process, and that equate to performing a generic docker
226226
build which is less secure than an S2I build and requires explicit permissions.
227227

228228
Therefore you should ensure that your S2I builder image either does not contain

creating_images/s2i_testing.adoc

+6-6
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ continuous integration.
1717

1818
[NOTE]
1919
====
20-
Check the link:s2i.html[S2I Requirements] topic to learn more about the S2I
20+
Check the xref:s2i.adoc#creating-images-s2i[S2I Requirements] topic to learn more about the S2I
2121
architecture before proceeding.
2222
====
2323

24-
As described in the link:s2i.html[S2I Requirements] topic, S2I requires the
24+
As described in the xref:s2i.adoc#creating-images-s2i[S2I Requirements] topic, S2I requires the
2525
*_assemble_* and *_run_* scripts to be present in order to successfully execute
2626
the S2I build. Providing the *_save-artifacts_* script reuses the build
2727
artifacts, and providing the *_usage_* script ensures that usage information is
@@ -148,9 +148,9 @@ platform itself as a continuous integration system. The {product-title} platform
148148
is capable of building Docker images and is highly customizable.
149149

150150
To set up an S2I image builder continuous integration system, define a
151-
link:../architecture/core_concepts/builds_and_image_streams.html#custom-build[Custom
151+
xref:../architecture/core_concepts/builds_and_image_streams.adoc#custom-build[Custom
152152
build] and use the *openshift/sti-image-builder* image. This image executes all
153-
the steps mentioned in the link:#basic-testing-workflow[Basic Testing Workflow]
153+
the steps mentioned in the xref:basic-testing-workflow[Basic Testing Workflow]
154154
section and creates a new S2I builder image.
155155

156156
.Sample `*CustomBuild*`
@@ -202,9 +202,9 @@ You can use the `oc create` command to create this `*BuildConfig*`. After you cr
202202

203203
If your {product-title} instance is hosted on a public IP address, the build can
204204
be triggered each time you push into your S2I builder image GitHub repository.
205-
See link:../dev_guide/builds.html#webhook-triggers[webhook triggers] for more
205+
See xref:../dev_guide/builds.adoc#webhook-triggers[webhook triggers] for more
206206
information.
207207

208208
You can also use the `*CustomBuild*` to trigger a rebuild of your application
209-
based on the S2I image you updated. See link:../dev_guide/builds.html#image-change-triggers[image change triggers]
209+
based on the S2I image you updated. See xref:../dev_guide/builds.adoc#image-change-triggers[image change triggers]
210210
for more information.

rest_api/openshift_v1.adoc

+2
Original file line numberDiff line numberDiff line change
@@ -10171,6 +10171,7 @@ BinaryBuildSource describes a binary file to be used for the Docker and Source b
1017110171
|asFile|AsFile indicates that the provided binary input should be considered a single file within the build input. For example, specifying "webapp.war" would place the provided binary as `/webapp.war` for the builder. If left empty, the Docker and Source build strategies assume this file is a zip, tar, or tar.gz file and extract it as the source. The custom strategy receives this binary as standard input. This filename may not contain slashes or be '..' or '.'.|false|string|
1017210172
|===
1017310173

10174+
[[v1-build]]
1017410175
=== v1.Build
1017510176
:hardbreaks:
1017610177
Build encapsulates the inputs needed to produce a new deployable image, as well as the status of the execution and a reference to the Pod which executed the build.
@@ -10266,6 +10267,7 @@ BuildLog is the (unused) resource associated with the build log redirector
1026610267
|apiVersion|APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/release-1.2/docs/devel/api-conventions.md#resources|false|string|
1026710268
|===
1026810269

10270+
[[v1-buildoutput]]
1026910271
=== v1.BuildOutput
1027010272
:hardbreaks:
1027110273
BuildOutput is input to a build strategy and describes the Docker image that the strategy should produce.

0 commit comments

Comments
 (0)