This is a sample project that uses the docker-maven-plugin to build and run a PostgreSQL server during integration testing, especially to verify that Flyway database migrations fail before continuous deployment.
For more information visit my blog where I'll explain the most important concepts.