I have a maven project to build an image that runs fine, it looks like :
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>${docker-maven-plugin.version}</version>
<configuration>
<showLogs>true</showLogs>
<images>
<image>
<name>${docker.image.name}</name>
<alias>${project.artifactId}-${timestamp}</alias>
<build>
<dockerFile>${docker.dockerfile}</dockerFile>
</build>
I want to use docker-compose to run a container from this image so I added right below the former snippet:
<external>
<type>compose</type>
<basedir>src/main/docker</basedir>
<composeFile>docker-compose.yml</composeFile>
</external>
Then when I run, the image is not built anymore :
[INFO] --- docker-maven-plugin:0.20.0:build (build-image) @ my-component ---
[INFO]
[INFO] --- docker-maven-plugin:0.20.0:stop (build-image) @ my-component ---
[INFO]
[INFO] --- docker-maven-plugin:0.20.0:start (run-image) @ my-component ---
[INFO] DOCKER> Pulling repository toto.com/mu-repo/my-component
[ERROR] DOCKER> Error occurred during container startup, shutting down...
[ERROR] DOCKER> I/O Error
Error being that image does not exist localy.
I read the documentation, the "external" expected behaviour is not so clear to me but I did not saw anything implying a image build deactivation.
Did anyone face same issue, does anyone know about correct setup, or if I am not using the plugin the way it's meant to ?