# ExecutableResource

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

A resource that represents a specified executable process.

## Remarks

You can run any executable command using its full path.
As a security feature, Aspire doesn't run executable unless the command is located in a path listed in the PATH environment variable.
To run an executable file that's in the current directory, specify the full path or use the relative path `./` to represent the current directory.

## Definition

```go
type ExecutableResource interface {
    IComputeResource
    Resource
    ResourceWithArgs
    ResourceWithEndpoints
    ResourceWithEnvironment
    ResourceWithWaitSupport
}
```

## Embeds

- [`IComputeResource`](/reference/api/go/aspire.hosting/icomputeresource.md)
- [`Resource`](/reference/api/go/aspire.hosting/resource.md)
- [`ResourceWithArgs`](/reference/api/go/aspire.hosting/resourcewithargs.md)
- [`ResourceWithEndpoints`](/reference/api/go/aspire.hosting/resourcewithendpoints.md)
- [`ResourceWithEnvironment`](/reference/api/go/aspire.hosting/resourcewithenvironment.md)
- [`ResourceWithWaitSupport`](/reference/api/go/aspire.hosting/resourcewithwaitsupport.md)

## Methods

- [PublishAsDockerFile](/reference/api/go/aspire.hosting/executableresource/publishasdockerfile.md) -- `method` -- Publishes an executable as a Docker file
  ```go
  PublishAsDockerFile(configure func(obj ContainerResource)) ExecutableResource
  ```
- [WithExecutableCommand](/reference/api/go/aspire.hosting/executableresource/withexecutablecommand.md) -- `method` -- Sets the command for the executable resource.
  ```go
  WithExecutableCommand(command string) ExecutableResource
  ```
- [WithExecutableDebugSupport](/reference/api/go/aspire.hosting/executableresource/withexecutabledebugsupport.md) -- `method` -- Adds VS Code-compatible debug metadata for an executable resource.
  ```go
  WithExecutableDebugSupport(launchConfigurationType string, scriptPath string, options ...*WithExecutableDebugSupportOptions) ExecutableResource
  ```
- [WithVolume](/reference/api/go/aspire.hosting/executableresource/withvolume.md) -- `method` -- Adds a volume to an executable resource.
  ```go
  WithVolume(target string, name string, env string, options ...*ExecutableResourceWithVolumeOptions) ExecutableResource
  ```
- [WithWorkingDirectory](/reference/api/go/aspire.hosting/executableresource/withworkingdirectory.md) -- `method` -- Sets the working directory for the executable resource.
  ```go
  WithWorkingDirectory(workingDirectory string) ExecutableResource
  ```
