Skip to content

Commit a35862d

Browse files
authored
docs: Extend example copying files to a container (#1487)
1 parent 94abb4a commit a35862d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

docs/api/create_docker_container.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,11 @@ _ = new ContainerBuilder()
4545

4646
```csharp title="Copying a file"
4747
_ = new ContainerBuilder()
48-
.WithResourceMapping(new FileInfo("appsettings.json"), "/app/");
48+
# copy to the `/app` directory
49+
.WithResourceMapping(new FileInfo("appsettings.json"), "/app")
50+
51+
# copy to a specific file
52+
.WithResourceMapping(new FileInfo("appsettings.Container.json"), new FileInfo("/app/appsettings.Developer.json"));
4953
```
5054

5155
Another overloaded member of the container builder API allows you to copy the contents of a byte array to a specific file path within the container. This can be useful when you already have the file content stored in memory or when you need to dynamically generate the file content before copying it.

0 commit comments

Comments
 (0)