mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-07 00:48:01 +01:00
22 lines
874 B
Plaintext
22 lines
874 B
Plaintext
// Module included in the following assemblies:
|
|
// * builds/build-strategies.adoc
|
|
|
|
:_mod-docs-content-type: PROCEDURE
|
|
[id="builds-strategy-dockerfile-path_{context}"]
|
|
= Using Dockerfile path
|
|
|
|
By default, docker builds use a Dockerfile located at the root of the context specified in the `BuildConfig.spec.source.contextDir` field.
|
|
|
|
The `dockerfilePath` field allows the build to use a different path to locate your Dockerfile, relative to the `BuildConfig.spec.source.contextDir` field. It can be a different file name than the default Dockerfile, such as `MyDockerfile`, or a path to a Dockerfile in a subdirectory, such as `dockerfiles/app1/Dockerfile`.
|
|
|
|
.Procedure
|
|
|
|
To use the `dockerfilePath` field for the build to use a different path to locate your Dockerfile, set:
|
|
|
|
[source,yaml]
|
|
----
|
|
strategy:
|
|
dockerStrategy:
|
|
dockerfilePath: dockerfiles/app1/Dockerfile
|
|
----
|