1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00
Files
openshift-docs/modules/builds-dockerfile-source.adoc
Max Bridges b5fc467d1f add content types to untagged modules
OSDOCS-16694
2025-10-31 21:02:28 -04:00

26 lines
940 B
Plaintext

// Module included in the following assemblies:
//
// * builds/creating-build-inputs.adoc
:_mod-docs-content-type: CONCEPT
[id="builds-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 is 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 is built.
ifndef::openshift-rosa,openshift-rosa-hcp[]
[role="_additional-resources"]
.Additional resources
* The typical use for this field is to provide a Dockerfile to a docker strategy build.
endif::openshift-rosa,openshift-rosa-hcp[]