Skip to content

Commit 8965712

Browse files
kevinrobaynarnorth
andauthored
Add example of mapping from file in system (#3808)
Co-authored-by: Richard North <[email protected]>
1 parent a2fa424 commit 8965712

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

docs/features/files.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Files and volumes
22

3+
## File mapping
4+
5+
It is possible to map a file or directory from your FileSystem into the container as a volume using `withFileSystemBind`:
6+
```java
7+
String pathToFile = System.getProperty("user.home") + "/.aws";
8+
new GenericContainer(...)
9+
.withFileSystemBind(pathToFile, "/home/user/.aws", BindMode.READ_ONLY)
10+
```
11+
312
## Volume mapping
413

514
It is possible to map a file or directory **on the classpath** into the container as a volume using `withClasspathResourceMapping`:

0 commit comments

Comments
 (0)