Share via


DockerfileStage.Comment(String) Method

Definition

Adds a comment to the Dockerfile. Multi-line comments are supported.

public Aspire.Hosting.ApplicationModel.Docker.DockerfileStage Comment(string comment);
member this.Comment : string -> Aspire.Hosting.ApplicationModel.Docker.DockerfileStage
Public Function Comment (comment As String) As DockerfileStage

Parameters

comment
String

The comment text. Can be single-line or multi-line.

Returns

The current stage.

Remarks

When a multi-line comment is provided, each line will be prefixed with '#'. Empty lines in multi-line comments are preserved as comment lines.

Applies to