DockerfileBuilder.Arg Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Arg(String) |
Adds a global ARG statement to define a build-time variable before any stages. |
| Arg(String, String) |
Adds a global ARG statement to define a build-time variable with a default value before any stages. |
Arg(String)
- Source:
- DockerfileBuilder.cs
Adds a global ARG statement to define a build-time variable before any stages.
public Aspire.Hosting.ApplicationModel.Docker.DockerfileBuilder Arg(string name);
member this.Arg : string -> Aspire.Hosting.ApplicationModel.Docker.DockerfileBuilder
Public Function Arg (name As String) As DockerfileBuilder
Parameters
- name
- String
The name of the build argument.
Returns
The current DockerfileBuilder instance for method chaining.
Remarks
Global ARG statements appear before the first FROM statement and can be used to parameterize the base image selection.
Applies to
Arg(String, String)
- Source:
- DockerfileBuilder.cs
Adds a global ARG statement to define a build-time variable with a default value before any stages.
public Aspire.Hosting.ApplicationModel.Docker.DockerfileBuilder Arg(string name, string defaultValue);
member this.Arg : string * string -> Aspire.Hosting.ApplicationModel.Docker.DockerfileBuilder
Public Function Arg (name As String, defaultValue As String) As DockerfileBuilder
Parameters
- name
- String
The name of the build argument.
- defaultValue
- String
The default value for the build argument.
Returns
The current DockerfileBuilder instance for method chaining.
Remarks
Global ARG statements appear before the first FROM statement and can be used to parameterize the base image selection.