Skip to content

Commit 4fb890c

Browse files
Copilotdavidfowl
andcommitted
Update README to use WithDockerfileBaseImage extension method
Co-authored-by: davidfowl <95136+davidfowl@users.noreply.github.com>
1 parent 46c54ea commit 4fb890c

File tree

1 file changed

+4
-6
lines changed
  • src/CommunityToolkit.Aspire.Hosting.Golang

1 file changed

+4
-6
lines changed

src/CommunityToolkit.Aspire.Hosting.Golang/README.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,14 @@ The integration automatically detects the Go version to use by:
4242

4343
### Customizing Base Images
4444

45-
You can customize the base images used in the Dockerfile by using the `DockerfileBaseImageAnnotation`:
45+
You can customize the base images used in the Dockerfile:
4646

4747
```csharp
4848
var golang = builder.AddGolangApp("golang", "../gin-api")
4949
.WithHttpEndpoint(env: "PORT")
50-
.WithAnnotation(new DockerfileBaseImageAnnotation
51-
{
52-
BuildImage = "golang:1.22-alpine", // Custom build stage image
53-
RuntimeImage = "alpine:3.20" // Custom runtime stage image
54-
});
50+
.WithDockerfileBaseImage(
51+
buildImage: "golang:1.22-alpine",
52+
runtimeImage: "alpine:3.20");
5553
```
5654

5755
### Generated Dockerfile

0 commit comments

Comments
 (0)