DockerfileBuilder.From 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
| From(String) |
Adds a FROM statement to start a new stage. |
| From(String, String) |
Adds a FROM statement to start a new named stage. |
From(String)
- Source:
- DockerfileBuilder.cs
Adds a FROM statement to start a new stage.
public Aspire.Hosting.ApplicationModel.Docker.DockerfileStage From(string image);
member this.From : string -> Aspire.Hosting.ApplicationModel.Docker.DockerfileStage
Public Function From (image As String) As DockerfileStage
Parameters
- image
- String
The image reference (e.g., 'node:18' or 'alpine:latest').
Returns
A stage builder for the new stage.
Applies to
From(String, String)
- Source:
- DockerfileBuilder.cs
Adds a FROM statement to start a new named stage.
public Aspire.Hosting.ApplicationModel.Docker.DockerfileStage From(string image, string stageName);
member this.From : string * string -> Aspire.Hosting.ApplicationModel.Docker.DockerfileStage
Public Function From (image As String, stageName As String) As DockerfileStage
Parameters
- image
- String
The image reference (e.g., 'node:18' or 'alpine:latest').
- stageName
- String
The stage name for multi-stage builds.
Returns
A stage builder for the new stage.