Skip to content

Commit e0a557b

Browse files
committed
fix(core): default to Ryuk 0.14.0, which doesn't break concurrent image pulls
Ryuk 0.8.1 cleans up each session with ImagesPrune filtered to the session label. On the containerd image store, the default since Docker 29, the daemon's ImagePrune deletes every in-flight pull's lease before it applies the filter (moby/moby#53321). Each test session that ends therefore corrupts the image pulls of every other process on the same daemon, which fail with "lease does not exist", "failed commit on ref" or "failed to extract layer". Ryuk 0.10.0 and later remove images one at a time with ImageRemove and never call ImagesPrune.
1 parent 6146aa1 commit e0a557b

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ You can set environment variables to configure the library behaviour:
4848
| `TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE` | `/var/run/docker.sock` | Path to Docker's socket used by ryuk |
4949
| `TESTCONTAINERS_RYUK_PRIVILEGED` | `false` | Run ryuk as a privileged container |
5050
| `TESTCONTAINERS_RYUK_DISABLED` | `false` | Disable ryuk |
51-
| `RYUK_CONTAINER_IMAGE` | `testcontainers/ryuk:0.8.1` | Custom image for ryuk |
51+
| `RYUK_CONTAINER_IMAGE` | `testcontainers/ryuk:0.14.0` | Custom image for ryuk |
5252
| `RYUK_RECONNECTION_TIMEOUT` | `10s` | Reconnection timeout for Ryuk TCP socket before Ryuk reaps all dangling containers |
5353

5454
Alternatively you can set the configuration during runtime:

‎docs/features/configuration.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ The following properties are supported:
4646
| `ryuk.disabled` | `TESTCONTAINERS_RYUK_DISABLED` | Disable the Garbage Collector | false |
4747
| `ryuk.container.privileged` | `TESTCONTAINERS_RYUK_PRIVILEGED` | Run Ryuk in privileged mode | false |
4848
| `ryuk.reconnection.timeout` | `RYUK_RECONNECTION_TIMEOUT` | Time to wait before reconnecting | 10s |
49-
| `ryuk.image` | `RYUK_CONTAINER_IMAGE` | Ryuk container image | testcontainers/ryuk:0.8.1 |
49+
| `ryuk.image` | `RYUK_CONTAINER_IMAGE` | Ryuk container image | testcontainers/ryuk:0.14.0 |
5050
| `connection.mode` | `TESTCONTAINERS_CONNECTION_MODE` | Connection mode (bridge_ip, gateway_ip, docker_host) | - |
5151

5252
Additional configuration options:
@@ -129,7 +129,7 @@ docker.cert.path=/path/to/certs
129129
ryuk.disabled=false
130130
ryuk.container.privileged=true
131131
ryuk.reconnection.timeout=30s
132-
ryuk.image=testcontainers/ryuk:0.8.1
132+
ryuk.image=testcontainers/ryuk:0.14.0
133133

134134
# Testcontainers configuration
135135
tc.host=tcp://my.testcontainers.host:1234

‎docs/index.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ Configuration
133133
+-------------------------------------------+---------------------------------------------------+------------------------------------------+
134134
| ``TESTCONTAINERS_RYUK_DISABLED`` | ``false`` | Disable ryuk |
135135
+-------------------------------------------+---------------------------------------------------+------------------------------------------+
136-
| ``RYUK_CONTAINER_IMAGE`` | ``testcontainers/ryuk:0.8.1`` | Custom image for ryuk |
136+
| ``RYUK_CONTAINER_IMAGE`` | ``testcontainers/ryuk:0.14.0`` | Custom image for ryuk |
137137
+-------------------------------------------+---------------------------------------------------+------------------------------------------+
138138
| ``DOCKER_AUTH_CONFIG`` | ``{"auths": {"<url>": {"auth": "<encoded>"}}}`` | Custom registry auth config |
139139
+-------------------------------------------+---------------------------------------------------+------------------------------------------+

‎src/testcontainers/core/config.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def _render_bool(self, env_name: str, prop_name: str) -> bool:
102102

103103
max_tries: int = int(environ.get("TC_MAX_TRIES", "120"))
104104
sleep_time: float = float(environ.get("TC_POOLING_INTERVAL", "1"))
105-
ryuk_image: str = environ.get("RYUK_CONTAINER_IMAGE", "testcontainers/ryuk:0.8.1")
105+
ryuk_image: str = environ.get("RYUK_CONTAINER_IMAGE", "testcontainers/ryuk:0.14.0")
106106
_ryuk_privileged: Optional[bool] = None
107107
_ryuk_disabled: Optional[bool] = None
108108
_ryuk_docker_socket: str = ""

0 commit comments

Comments
 (0)