Skip to content
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

[Bug]: Could not find unix domain socket with containerd #8106

Open
anton-erofeev opened this issue Jan 10, 2024 · 1 comment
Open

[Bug]: Could not find unix domain socket with containerd #8106

anton-erofeev opened this issue Jan 10, 2024 · 1 comment
Labels

Comments

@anton-erofeev
Copy link

Module

Core

Testcontainers version

1.19.3

Using the latest Testcontainers version?

Yes

Host OS

Linux

Host Arch

x86

Docker version

nerdctl version 1.0.0

What happened?

I'm trying to run gradle java spring app with testcontainers in containerd container but I'm getting the following error:

ERROR org.testcontainers.dockerclient.DockerClientProviderStrategy -- Could not find a valid Docker environment. Please check configuration. Attempted configurations were:
          UnixSocketClientProviderStrategy: failed with exception InvalidConfigurationException (Could not find unix domain socket). Root cause NoSuchFileException (/var/run/docker.sock)
          DockerDesktopClientProviderStrategy: failed with exception NullPointerException (Cannot invoke "java.nio.file.Path.toString()" because the return value of "org.testcontainers.dockerclient.DockerDesktopClientProviderStrategy.getSocketPath()" is null)As no valid configuration was found, execution cannot continue.

This is because containerd does not support docker socket and there really is no file there.
Could you tell me, is there any workaround for this? couldn't find the configuration setting for containerd in the documentation

Relevant log output

ERROR org.testcontainers.dockerclient.DockerClientProviderStrategy -- Could not find a valid Docker environment. Please check configuration. Attempted configurations were:
          UnixSocketClientProviderStrategy: failed with exception InvalidConfigurationException (Could not find unix domain socket). Root cause NoSuchFileException (/var/run/docker.sock)
          DockerDesktopClientProviderStrategy: failed with exception NullPointerException (Cannot invoke "java.nio.file.Path.toString()" because the return value of "org.testcontainers.dockerclient.DockerDesktopClientProviderStrategy.getSocketPath()" is null)As no valid configuration was found, execution cannot continue.

Additional Information

No response

@anton-erofeev anton-erofeev changed the title [Bug]: [Bug]: Could not find unix domain socket with containerd Jan 11, 2024
@loop-ozav
Copy link

loop-ozav commented Jan 30, 2024

Despite having in my docker-compose.yml:

volumes:
      - $PWD:$PWD
      - $HOME/.docker/run/docker.sock:/var/run/docker.sock

I also tried:

- /var/run/docker.sock:/var/run/docker.sock

I struck with the same issue:

[Test worker] ERROR org.testcontainers.dockerclient.DockerClientProviderStrategy -- Could not find a valid Docker environment. Please check configuration. Attempted configurations were:
UnixSocketClientProviderStrategy: failed with exception InvalidConfigurationException (Could not find unix domain socket). Root cause NoSuchFileException (/var/run/docker.sock)
DockerDesktopClientProviderStrategy: failed with exception NullPointerException (Cannot invoke "java.nio.file.Path.toString()" because the return value of "org.testcontainers.dockerclient.DockerDesktopClientProviderStrategy.getSocketPath()" is null)As no valid configuration was found, execution cannot continue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants