Streaming content from a local file system to the builder is
Binary type build. The corresponding value of
Binary for such builds.
This source type is unique in that it is leveraged solely based on your use of
Binary type builds require content to be streamed from the local file system, so
automatically triggering a binary type build (e.g. via an image change trigger)
is not possible, because the binary files cannot be provided. Similarly, you
cannot launch binary type builds from the web console.
To utilize binary builds, invoke
oc start-build with one of these options:
--from-file: The contents of the file you specify are sent as a binary
stream to the builder. The builder then stores the data in a file with the
same name at the top of the build context.
--from-repo: The contents are archived and sent as a binary
stream to the builder. The builder then extracts the contents of the archive
within the build context directory.
In each of the above cases:
BuildConfig already has a
Binary source type defined, it will
effectively be ignored and replaced by what the client sends.
BuildConfig has a
Git source type defined, it is dynamically
Git are mutually exclusive, and the data in
the binary stream provided to the builder takes precedence.
oc new-build --binary=true, the command ensures that the
restrictions associated with binary builds are enforced. The resulting
BuildConfig will have a source type of
Binary, meaning that the only
valid way to run a build for this
BuildConfig is to use
start-build with one of the
--from options to provide the requisite binary
contextDir source options have
special meaning with binary builds.
dockerfile can be used with any binary build source. If
used and the binary stream is an archive, its contents serve as a replacement
Dockerfile to any Dockerfile in the archive. If
dockerfile is used with the
--from-file argument, and the file argument is named
dockerfile, the value
dockerfile replaces the value from the binary stream.
In the case of the binary stream encapsulating extracted archive content, the
value of the
contextDir field is interpreted as a subdirectory within the
archive, and, if valid, the builder changes into that subdirectory before
executing the build.