DockerfileStage
Class net10.0
Represents a stage within a multi-stage Dockerfile.
namespace Aspire.Hosting.ApplicationModel.Docker;
public class DockerfileStage : Aspire.Hosting.ApplicationModel.Docker.DockerfileStatement{ // ...} 20 members
Constructors1
Section titled ConstructorsProperties2
Section titled PropertiesMethods17
Section titled MethodsArg(string)experimental Adds an ARG statement to define a build-time variable.
Arg(string, string)experimental Adds an ARG statement to define a build-time variable with a default value.
Cmd(string[])experimental Adds a CMD statement to set the default command.
Comment(string)experimental Adds a comment to the Dockerfile. Multi-line comments are supported.
Copy(string, string)experimental Adds a COPY statement to copy files from the build context.
Copy(string, string, string)experimental Adds a COPY statement to copy files with ownership change.
CopyFrom(string, string, string)experimental Adds a COPY statement to copy files from another stage.
CopyFrom(string, string, string, string)experimental Adds a COPY statement to copy files from another stage with ownership change.
EmptyLineexperimental Adds an empty line to the Dockerfile for better readability.
Entrypoint(string[])experimental Adds an ENTRYPOINT statement to set the container entrypoint.
Env(string, string)experimental Adds an ENV statement to set an environment variable.
Expose(int)experimental Adds an EXPOSE statement to expose a port.
Run(string)experimental Adds a RUN statement to execute a command.
RunWithMounts(string, string[])experimental Adds a RUN statement with mount options for BuildKit.
User(string)experimental Adds a USER statement to set the user for subsequent commands.
WorkDir(string)experimental Adds a WORKDIR statement to set the working directory.
WriteStatementAsync(StreamWriter, CancellationToken)Task Writes the statement to the specified writer.