testcontainers-dotnet
testcontainers-dotnet copied to clipboard
[Enhancement]: Add Resource Reaper (Ryuk) WCOW support
Testcontainers version
3.8.0 bet
Using the latest Testcontainers version?
Yes
Host OS
Windows
Host arch
X64
.NET version
8
Docker version
Latest
Docker info
latest
What happened?
Ryuk latest version supports Windows containers. Can the default ryuk version be updated to latest version please?
Relevant log output
No response
Additional information
No response
I looked into it yesterday and prepared a branch that adds and integrates Ryuk's new version (with WCOW support). Unfortunately, I had forgotten about the limitations of GitHub-hosted runners/Microsoft-hosted agents on Windows (https://github.com/actions/runner-images/issues/6688). Without updating Docker's daemon configuration, we cannot mount the named pipe:
$daemonSettings = New-Object PSObject
$daemonSettings | Add-Member NoteProperty hosts @("npipe://")
$daemonSettings | Add-Member NoteProperty group "Users"
$daemonSettings | ConvertTo-Json | Out-File -FilePath "$($env:ProgramData)\docker\config\daemon.json" -Encoding ASCII
Get-Service -Name *docker* | Restart-Service
If we adjust the configuration before running the tests, Ryuk runs fine, but adding Ryuk support will break the tests for others (using the mentioned runners/agents) if they do not apply the same configuration. As long as the runners/agents do not support it, I do not think we can really add support for this feature (/cc @mdelapenya).
@HofmeisterAn we must update the docs then. And be clear that without that configuration it won't work. wdyt?
Developers can opt out in CI (ephemeral) using TESTCONTAINERS_RYUK_DISABLED
. It is probably simpler than applying the configuration. This would be similar to existing configurations (that rely on the Linux Engine) too.
@HofmeisterAn we must update the docs then. And be clear that without that configuration it won't work. wdyt?
Yep, docs + a proper log message sounds good.
The problem is that if the reaper detects it's windows, it won't start it, even with the custom config to use the new ryuk version
https://github.com/testcontainers/testcontainers-dotnet/blob/14f9ad92ece7b5539aed0c8f2f7c5415ab97aab8/src/Testcontainers/Configurations/TestcontainersSettings.cs
Could we at least remove that if until complete support for WCOW ? This was at least we can use the new images of ruyk that supports windows
The problem is that if the reaper detects it's windows, it won't start it, even with the custom config to use the new ryuk version
https://github.com/testcontainers/testcontainers-dotnet/blob/14f9ad92ece7b5539aed0c8f2f7c5415ab97aab8/src/Testcontainers/Configurations/TestcontainersSettings.cs
Could we at least remove that if until complete support for WCOW ? This was at least we can use the new images of ruyk that supports windows
I assume you are referring to the if-statement. Removing this alone is not sufficient to enable or support Ryuk on WCOW.