-
-
Notifications
You must be signed in to change notification settings - Fork 187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Could not find a working container runtime strategy" when starting MySqlContainer #813
Comments
I checked #785 this issue and tried to follow all the instructions but without success :( |
@msahakyan-korio testcontainers isn't able to find a single valid container runtime. Although you say Docker is installed, it hasn't exposed a socket in any of the known locations (root or rootless locations). I would double check that it's running. |
@cristianrgreco Error message: I even tried for the simplest setup but still the same issue. import {GenericContainer, StartedTestContainer} from 'testcontainers'; async setup() {
.... |
Setting those fields and env variables wouldn't have resulted in testcontainers suddenly finding an available container runtime.
I'd suggest you look at the logs to see why port 80 isn't being bound, or if it's being bound why it isn't available in your network, and raise an issue here once you've established that there's an issue with Testcontainers, and not with how it's being used. |
Expected Behaviour
Should work without any issue (as it works in local env)
Actual Behaviour
I get Could not find a working container runtime strategy
Testcontainer Logs
2024-08-04T23:22:17.338Z testcontainers [DEBUG] Checking container runtime strategy "TestcontainersHostStrategy"...
2024-08-04T23:22:17.339Z testcontainers [DEBUG] Container runtime strategy "TestcontainersHostStrategy" is not applicable
2024-08-04T23:22:17.340Z testcontainers [DEBUG] Checking container runtime strategy "ConfigurationStrategy"...
2024-08-04T23:22:17.340Z testcontainers [DEBUG] Container runtime strategy "ConfigurationStrategy" is not applicable
2024-08-04T23:22:17.340Z testcontainers [DEBUG] Checking container runtime strategy "UnixSocketStrategy"...
2024-08-04T23:22:17.340Z testcontainers [DEBUG] Container runtime strategy "UnixSocketStrategy" is not applicable
2024-08-04T23:22:17.340Z testcontainers [DEBUG] Checking container runtime strategy "RootlessUnixSocketStrategy"...
2024-08-04T23:22:17.341Z testcontainers [DEBUG] Container runtime strategy "RootlessUnixSocketStrategy" is not applicable
2024-08-04T23:22:17.341Z testcontainers [DEBUG] Checking container runtime strategy "NpipeSocketStrategy"...
2024-08-04T23:22:17.341Z testcontainers [DEBUG] Container runtime strategy "NpipeSocketStrategy" is not applicable
Tearing down test environment.
FAIL test/app.spec.ts
● Test suite failed to run
Could not find a working container runtime strategy
8 |
9 | async setup() {
> 10 | const mySqlContainer = await new MySqlContainer()
| ^
11 | .start()
12 |
13 | this.containers.push(mySqlContainer);
at getContainerRuntimeClient (../node_modules/testcontainers/src/container-runtime/clients/client.ts:64:9)
at MySqlContainer.start (../node_modules/testcontainers/src/generic-container/generic-container.ts:81:20)
at MySqlContainer.start (../node_modules/@testcontainers/mysql/src/mysql-container.ts:44:7)
at TestContainersEnvironment.setup (../src/config/test/test.containers.environment.ts:10:32)
at TestEnvironment.setup (../src/config/test/test.environment.ts:18:17)
Steps to Reproduce
Environment Information
Additional info:
My runner config:
[[runners]]
name = "My Docker Runner"
url = "https://gitlab.some-host.ca/"
id = 14
token = "XXXXXXXXXXXXXXXX"
token_obtained_at = 2024-08-04T21:09:18Z
token_expires_at = 0001-01-01T00:00:00Z
executor = "docker"
[runners.custom_build_dir]
[runners.cache]
MaxUploadedArchiveSize = 0
[runners.cache.s3]
[runners.cache.gcs]
[runners.cache.azure]
[runners.docker]
tls_verify = false
image = "docker:23.0.1"
privileged = true
disable_entrypoint_overwrite = false
oom_kill_disable = false
disable_cache = false
volumes = ["/certs/client", "/cache"]
shm_size = 0
network_mtu = 0
The text was updated successfully, but these errors were encountered: