Skip to content

Commit 570ce63

Browse files
committed
create containers: harmonize content
1 parent 290b5f6 commit 570ce63

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

docs/features/creating_container.md

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# How to create a container
1+
# How to Create a Container
22

33
Testcontainers-Python is a thin wrapper around Docker designed for use in tests. Anything you can run in Docker, you can spin up with Testcontainers-Python:
44

@@ -29,14 +29,14 @@ def test_basic_container():
2929

3030
## Advanced Container Configuration
3131

32-
For more complex scenarios, you can use the `run` helper function which provides a high-level interface similar to Docker's `docker run` command. This helper automatically handles:
32+
For more complex scenarios, use the `run` helper function. This high-level interface is similar to `docker run` and automatically handles:
3333

3434
- Creating temporary networks
3535
- Mounting files or tmpfs
3636
- Waiting for container readiness
3737
- Container cleanup
3838

39-
Here's an example showing various configuration options:
39+
Example with various configuration options:
4040

4141
```python
4242
import io
@@ -85,18 +85,16 @@ def test_nginx_advanced():
8585

8686
## Container Lifecycle Management
8787

88-
Testcontainers-Python provides several ways to manage container lifecycle:
89-
90-
1. Using context manager (recommended):
88+
Testcontainers-Python offers several ways to manage container lifecycle:
9189

90+
1. **Context manager (recommended):**
9291
```python
9392
with GenericContainer("nginx:alpine") as container:
9493
# Container is automatically started and stopped
9594
pass
9695
```
9796

98-
2. Manual management:
99-
97+
2. **Manual management:**
10098
```python
10199
container = GenericContainer("nginx:alpine")
102100
container.start()
@@ -108,8 +106,7 @@ finally:
108106
container.remove()
109107
```
110108

111-
3. Using pytest fixtures:
112-
109+
3. **Pytest fixtures:**
113110
```python
114111
import pytest
115112
from testcontainers.generic import GenericContainer
@@ -129,7 +126,7 @@ def test_with_nginx(nginx_container):
129126

130127
## Container Readiness
131128

132-
For information about waiting for containers to be ready, see the [Wait Strategies](wait_strategies.md) documentation.
129+
For details on waiting for containers to be ready, see [Wait strategies](wait_strategies.md).
133130

134131
## Best Practices
135132

0 commit comments

Comments
 (0)