Skip to content

Commit f2397a7

Browse files
authored
docs: Add low level API access (#1300)
1 parent 5cf055d commit f2397a7

File tree

4 files changed

+14
-0
lines changed

4 files changed

+14
-0
lines changed

.github/workflows/cicd.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@ name: Continuous Integration & Delivery
33
on:
44
push:
55
branches: [ develop, main, bugfix/*, feature/* ]
6+
paths-ignore: [ 'docs/**', 'examples/**' ]
67
pull_request:
78
branches: [ develop, main ]
9+
paths-ignore: [ 'docs/**', 'examples/**' ]
810
workflow_dispatch:
911
inputs:
1012
publish_nuget_package:

.github/workflows/codeql-analysis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@ name: CodeQL
33
on:
44
push:
55
branches: [ develop, main ]
6+
paths-ignore: [ 'docs/**', 'examples/**' ]
67
pull_request:
78
branches: [ develop, main ]
9+
paths-ignore: [ 'docs/**', 'examples/**' ]
810

911
concurrency:
1012
group: ${{ github.workflow }}-${{ github.head_ref || github.sha }}

docs/api/low_level_api_access.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Low level API access
2+
3+
Testcontainers does not expose all available [Docker Engine APIs](https://docs.docker.com/reference/api/engine/latest/) through its container, image, network, and volume builders. In some cases, you may need to access the underlying Docker Engine API to configure specific properties that are not available via Testcontainers' API. To access all available Docker Engine API properties for creating a resource, use the builder method: `WithCreateParameterModifier(Action<TCreateResourceEntity>)`. This method allows you to use a callback to configure the final payload that is sent to the Docker Engine.
4+
5+
```csharp title="Setting the memory limit to 2GB"
6+
const long TwoGB = 2L * 1024 * 1024 * 1024;
7+
_ = new ContainerBuilder()
8+
.WithCreateParameterModifier(parameterModifier => parameterModifier.HostConfig.Memory = TwoGB);
9+
```

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ nav:
3636
- api/create_docker_image.md
3737
- api/create_docker_container.md
3838
- api/create_docker_network.md
39+
- api/low_level_api_access.md
3940
- api/resource_reaper.md
4041
- api/resource_reuse.md
4142
- api/wait_strategies.md

0 commit comments

Comments
 (0)