无法创builddocker访问对象

我想用fabric8的插件进行spring集成testing,但是当我尝试运行testing时,我得到了下一个错误:

无法创builddocker访问对象

我有Ubuntu的,我认为我有良好的configurationdocker,我没有任何问题,docker文件或dockercompose,所以可能会是一个权限问题,或者我忘了一些东西。

我通过下面我的fabric8configuration,这有一个图像的MySQL和maven-failsafe插件集成testing。

<!--maven plugin --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-failsafe-plugin</artifactId> <executions> <execution> <goals> <goal>integration-test</goal> <goal>verify</goal> </goals> </execution> </executions> <configuration> <environmentVariables> <it-database.port>${it-database.port}</it-database.port> </environmentVariables> </configuration> </plugin> <!--fabric8 plugin --> <plugin> <groupId>io.fabric8</groupId> <artifactId>docker-maven-plugin</artifactId> <version>0.18.1</version> <configuration> <!--<dockerHost>unix:///var/run/docker.sock</dockerHost>--> <dockerHost>tcp://0.0.0.0:2375</dockerHost> </configuration> <executions> <execution> <id>prepare-it-database</id> <phase>pre-integration-test</phase> <goals> <goal>start</goal> </goals> <configuration> <images> <image> <name>mysql:5.7</name> <alias>it-database</alias> <run> <ports> <port>it-database.port:5432</port> </ports> <wait> <log>database system is ready to accept connections</log> <time>20000</time> </wait> </run> </image> </images> </configuration> </execution> <execution> <id>remove-it-database</id> <phase>post-integration-test</phase> <goals> <goal>stop</goal> </goals> </execution> </executions> </plugin> 

你确定docker守护进程正在监听端口2375吗? 您可能想在pom.xml中尝试localhost或127.0.0.1而不是0.0.0.0。

你能打字吗?

  env | grep DOCKER 

这也可能是一个糟糕的环境variables