# DockerfileStage

- Module: [Aspire.Hosting](/reference/api/go/aspire.hosting.md)
- Version: `17.0.0`
- Kind: `handle`
- Source: [GitHub](https://github.com/microsoft/aspire/tree/bcfa151cdca6d0a573f22d5d9c23f9c727cb3b2f)

Represents a stage within a multi-stage Dockerfile.

## Definition

```go
type DockerfileStage interface{}
```

## Methods

- [AddContainerFiles](/reference/api/go/aspire.hosting/dockerfilestage/addcontainerfiles.md) -- `method` -- Adds COPY --from statements for published container files
  ```go
  AddContainerFiles(resource Resource, rootDestinationPath string, options ...*AddContainerFilesOptions) DockerfileStage
  ```
- [Arg](/reference/api/go/aspire.hosting/dockerfilestage/arg.md) -- `method` -- Adds an ARG statement to a Dockerfile stage
  ```go
  Arg(name string, options ...*ArgOptions) DockerfileStage
  ```
- [Cmd](/reference/api/go/aspire.hosting/dockerfilestage/cmd.md) -- `method` -- Adds a CMD statement to a Dockerfile stage
  ```go
  Cmd(command []string) DockerfileStage
  ```
- [Comment](/reference/api/go/aspire.hosting/dockerfilestage/comment.md) -- `method` -- Adds a comment to a Dockerfile stage
  ```go
  Comment(comment string) DockerfileStage
  ```
- [Copy](/reference/api/go/aspire.hosting/dockerfilestage/copy.md) -- `method` -- Adds a COPY statement to a Dockerfile stage
  ```go
  Copy(source string, destination string, options ...*CopyOptions) DockerfileStage
  ```
- [CopyFrom](/reference/api/go/aspire.hosting/dockerfilestage/copyfrom.md) -- `method` -- Adds a COPY --from statement to a Dockerfile stage
  ```go
  CopyFrom(from string, source string, destination string, options ...*CopyFromOptions) DockerfileStage
  ```
- [EmptyLine](/reference/api/go/aspire.hosting/dockerfilestage/emptyline.md) -- `method` -- Adds an empty line to a Dockerfile stage
  ```go
  EmptyLine() DockerfileStage
  ```
- [Entrypoint](/reference/api/go/aspire.hosting/dockerfilestage/entrypoint.md) -- `method` -- Adds an ENTRYPOINT statement to a Dockerfile stage
  ```go
  Entrypoint(command []string) DockerfileStage
  ```
- [Env](/reference/api/go/aspire.hosting/dockerfilestage/env.md) -- `method` -- Adds an ENV statement to a Dockerfile stage
  ```go
  Env(name string, value string) DockerfileStage
  ```
- [Expose](/reference/api/go/aspire.hosting/dockerfilestage/expose.md) -- `method` -- Adds an EXPOSE statement to a Dockerfile stage
  ```go
  Expose(port float64) DockerfileStage
  ```
- [Run](/reference/api/go/aspire.hosting/dockerfilestage/run.md) -- `method` -- Adds a RUN statement to a Dockerfile stage
  ```go
  Run(command string) DockerfileStage
  ```
- [RunWithMounts](/reference/api/go/aspire.hosting/dockerfilestage/runwithmounts.md) -- `method` -- Adds a RUN statement with mounts to a Dockerfile stage
  ```go
  RunWithMounts(command string, mounts []string) DockerfileStage
  ```
- [User](/reference/api/go/aspire.hosting/dockerfilestage/user.md) -- `method` -- Adds a USER statement to a Dockerfile stage
  ```go
  User(user string) DockerfileStage
  ```
- [WorkDir](/reference/api/go/aspire.hosting/dockerfilestage/workdir.md) -- `method` -- Adds a WORKDIR statement to a Dockerfile stage
  ```go
  WorkDir(path string) DockerfileStage
  ```
