Estoy tratando de dejar que testcontainers construya una instancia de mariadb de la siguiente manera:
connection = DriverManager.getConnection("jdbc:tc:mariadb:5.6.23:///datavault");Pero lo que obtengo es este registro:
01:03:00.438 [main] DEBUG otjdbc.ContainerDatabaseDriver - Container not found in cache, creating new instance 01:03:00.540 [main] DEBUG otuTestcontainersConfiguration - Testcontainers configuration overrides will be loaded from file:/home/tobias/.testcontainers.properties 01:03:00.545 [main] INFO otutility.ImageNameSubstitutor - Image name substitution will be performed by: DefaultImageNameSubstitutor (ConfigurationFileImageNameSubstitutor) 01:03:00.559 [main] DEBUG otutility.ImageNameSubstitutor - Did not find a substitute image for mariadb:5.6.23 (using image substitutor: DefaultImageNameSubstitutor (ConfigurationFileImageNameSubstitutor)) 01:03:00.612 [main] INFO otdDockerMachineClientProviderStrategy - docker-machine executable was not found on PATH ([/usr/local/sbin, /usr/local/bin, /usr/sbin, /usr/bin, /sbin, /bin, /usr/games, /usr/local/games, /snap/bin]) 01:03:00.612 [main] DEBUG otdRootlessDockerClientProviderStrategy - $XDG_RUNTIME_DIR is set but '/run/user/1000/snap.intellij-idea-community/docker.sock' does not exist. 01:03:00.613 [main] DEBUG otdRootlessDockerClientProviderStrategy - '/home/tobias/.docker/run' does not exist. 01:03:00.708 [main] DEBUG otdRootlessDockerClientProviderStrategy - '/run/user/1000/docker.sock' does not exist. 01:03:01.277 [ducttape-0] DEBUG otdDockerClientProviderStrategy - Pinging docker daemon... 01:03:01.299 [ducttape-0] DEBUG otscgdccommand.AbstrDockerCmd - Cmd: 01:03:01.428 [ducttape-0] DEBUG otdDockerClientProviderStrategy - Pinging docker daemon... 01:03:01.428 [ducttape-0] DEBUG otscgdccommand.AbstrDockerCmd - Cmd: 01:03:01.530 [ducttape-0] DEBUG otdDockerClientProviderStrategy - Pinging docker daemon... 01:03:01.530 [ducttape-0] DEBUG otscgdccommand.AbstrDockerCmd - Cmd: 01:03:01.633 [ducttape-0] DEBUG otdDockerClientProviderStrategy - Pinging docker daemon... 01:03:01.633 [ducttape-0] DEBUG otscgdccommand.AbstrDockerCmd - Cmd: ... Estoy usando la instalación predeterminada de docker desde el repositorio de ubuntu proporcionado por docker mismo .
Suponiendo que testcontainers no pueda leer el archivo /var/run/docker.sock,
Agregué mi usuario al grupo docker, ¡pero el error es el mismo!
Además, probé el ejemplo de inicio rápido , ¡pero sigo teniendo el mismo error!
Muchas gracias por su ayuda,
déjame saber si necesitas más información!
A veces puede ser tan fácil:
Agregar al grupo docker fue la idea correcta
pero lo que olvidé es el hecho de que agregar a un grupo
¡solo se toma después de que el usuario inicie sesión nuevamente!
23:18:04.457 [ducttape-0] DEBUG otdDockerClientProviderStrategy - Pinging docker daemon... 23:18:04.483 [ducttape-0] DEBUG otscgdccommand.AbstrDockerCmd - Cmd: 23:18:04.720 [main] INFO otdDockerClientProviderStrategy - Found Docker environment with local Unix socket (unix:///var/run/docker.sock) 23:18:04.721 [main] DEBUG otdDockerClientProviderStrategy - Transport type: 'okhttp', Docker host: 'unix:///var/run/docker.sock' 23:18:04.721 [main] DEBUG otdDockerClientProviderStrategy - Checking Docker OS type for local Unix socket (unix:///var/run/docker.sock) 23:18:04.722 [main] INFO o.testcontainers.DockerClientFactory - Docker host IP address is localhost 23:18:04.723 [main] DEBUG otscgdccommand.AbstrDockerCmd - Cmd: 23:18:04.742 [main] DEBUG otscgdccommand.AbstrDockerCmd - Cmd: 23:18:04.757 [main] INFO o.testcontainers.DockerClientFactory - Connected to docker: Server Version: 19.03.13 API Version: 1.40 Operating System: Ubuntu 18.04.5 LTS Total Memory: 7894 MB Después de eso me sale un nuevo error pero este es otro tema.
¡Perdón por molestar!