在maven中同时运行docker容器和spring启动应用程序是可能的吗?

我有一个连接到MongoDB实例的Spring Boot应用程序。 对于MongoDB实例,我使用docker,特别是使用fabric8中的maven docker插件。 我有这样的configuration:

<plugin> <groupId>io.fabric8</groupId> <artifactId>docker-maven-plugin</artifactId> <version>0.21.0</version> <configuration> <logDate>default</logDate> <autoPull>true</autoPull> <images> <image> <name>mongo:3.0.15</name> <run> <ports> <port>27018:27017</port> </ports> <wait> <log>(?s)database system is ready to accept connections.*database system is ready to accept connections</log> <time>40000</time> </wait> <log> <prefix>mongo-container</prefix> <color>yellow</color> </log> </run> </image> </images> </configuration> </plugin> 

它运行完美,如果我运行mvndocker:启动和在其他terminalmvn春季启动:运行。

我想知道的是,如果可以创build一些mavenconfiguration来运行一个像mvn docker这样的命令:start spring-boot:run。

谢谢!