Skip to content

Commit 24a5243

Browse files
Fix capitalization of PublishAsDockerFile method (#562)
1 parent db1be38 commit 24a5243

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/frontend/src/content/docs/app-host/executable-resources.mdx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -146,19 +146,19 @@ var app = builder.AddExecutable(
146146
});
147147
```
148148

149-
## Publishing with PublishAsDockerfile
149+
## Publishing with PublishAsDockerFile
150150

151-
For production deployment, executable resources need to be containerized. Use the `PublishAsDockerfile` method to specify how the executable should be packaged:
151+
For production deployment, executable resources need to be containerized. Use the `PublishAsDockerFile` method to specify how the executable should be packaged:
152152

153153
```csharp title="AppHost.cs"
154154
var builder = DistributedApplication.CreateBuilder(args);
155155

156156
var app = builder.AddExecutable(
157157
"frontend", "npm", ".", "start", "--port", "3000")
158-
.PublishAsDockerfile();
158+
.PublishAsDockerFile();
159159
```
160160

161-
When you call `PublishAsDockerfile()`, Aspire generates a Dockerfile during the publish process. You can customize this by providing your own Dockerfile:
161+
When you call `PublishAsDockerFile()`, Aspire generates a Dockerfile during the publish process. You can customize this by providing your own Dockerfile:
162162

163163
### Custom Dockerfile for publishing
164164

@@ -180,7 +180,7 @@ Then reference it in your AppHost:
180180
var builder = DistributedApplication.CreateBuilder(args);
181181

182182
var app = builder.AddExecutable("frontend", "npm", ".", "start")
183-
.PublishAsDockerfile([new DockerfileBuildArg("NODE_ENV", "production")]);
183+
.PublishAsDockerFile([new DockerfileBuildArg("NODE_ENV", "production")]);
184184
```
185185

186186
## Best practices
@@ -192,8 +192,8 @@ When working with executable resources:
192192
1. **Use explicit paths**: For better reliability, use full paths to executables when possible.
193193
1. **Handle dependencies**: Use `WithReference` to establish proper dependency relationships.
194194
1. **Configure explicit start**: Use `WithExplicitStart()` for executables that shouldn't start automatically.
195-
1. **Prepare for deployment**: Always use `PublishAsDockerfile()` for production scenarios.
195+
1. **Prepare for deployment**: Always use `PublishAsDockerFile()` for production scenarios.
196196
1. **Environment isolation**: Use environment variables rather than command-line arguments for sensitive configuration.
197197
1. **Resource naming**: Use descriptive names that clearly identify the executable's purpose.
198198

199-
</Steps>
199+
</Steps>

0 commit comments

Comments
 (0)