mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-06 15:46:57 +01:00
29 lines
930 B
Plaintext
29 lines
930 B
Plaintext
// Module included in the following assemblies:
|
|
//* assembly/builds
|
|
|
|
// This module can be included from assemblies using the following include statement:
|
|
// include::<path>/builds-dockerfile-source.adoc[leveloffset=+1]
|
|
|
|
[id="dockerfile-source_{context}"]
|
|
= Dockerfile source
|
|
|
|
When you supply a `dockerfile` value, the content of this field
|
|
is written to disk as a file named *_Dockerfile_*. This is
|
|
done after other input sources are processed, so if the input
|
|
source repository contains a *_Dockerfile_* in the root directory,
|
|
it will be overwritten with this content.
|
|
|
|
The source definition is part of the `spec` section in the `BuildConfig`:
|
|
|
|
[source,yaml]
|
|
----
|
|
source:
|
|
dockerfile: "FROM centos:7\nRUN yum install -y httpd" <1>
|
|
----
|
|
<1> The `dockerfile` field contains an inline Dockerfile that will be built.
|
|
|
|
.Additional resources
|
|
|
|
* The typical use for this field is to provide a `Dockerfile` to a
|
|
Docker strategy build.
|