Recently I have written about how one can create a PostgreSQL Docker
image with the Docker Maven Plugin to run integration tests that
require a database. While this worked all nice and well during
development, the concept has one flaw: the plugin will push the
database Docker image to a Docker registry during the
I do not want this temporary image to end up there. This is the
behavior of the Docker Maven Plugin and I have not found a way to
work around this. By “work around this” I mean somehow configure
the plugin to ignore this custom PSQL image during the “deploy”
phase. Unfortunately, there is only a global
<filter> that applies
to all the phases of the plugin.
There is a proper solution however, at least for what I was using the database.