Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions modules/builds-strategy-docker-build-arguments.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@

You can set link:http://docs.docker.com/v1.7/reference/api/hub_registry_spec/#docker-registry-1-0[docker build arguments] using the `BuildArgs` array. The build arguments are passed to docker when a build is started.

[TIP]
====
See link:https://docs.docker.com/engine/reference/builder/#understand-how-arg-and-from-interact[Understand how ARG and FROM interact] in the Dockerfile reference documentation.
====

.Procedure

To set docker build arguments, add entries to the `BuildArgs` array, which is located in the `dockerStrategy` definition of the `BuildConfig` object. For example:
Expand All @@ -18,3 +23,8 @@ dockerStrategy:
- name: "foo"
value: "bar"
----

[NOTE]
====
Only the `name` and `value` fields are supported. Any settings on the `valueFrom` field are ignored.
====
7 changes: 6 additions & 1 deletion modules/builds-strategy-docker-build.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,9 @@
[id="builds-strategy-docker-build_{context}"]
= Docker build

The docker build strategy invokes the docker build command, and it expects a repository with a Dockerfile and all required artifacts in it to produce a runnable image.
{product-title} uses Buildah to build a container image from a Dockerfile. For more information on building container images with Dockerfiles, see link:https://docs.docker.com/engine/reference/builder/[the Dockerfile reference documentation].

[TIP]
====
If you work with build arguments, see link:https://docs.docker.com/engine/reference/builder/#understand-how-arg-and-from-interact[Understand how ARG and FROM interact] in the Dockerfile reference documentation.
====