br4chu / docker-compose-maven-plugin

Maven plugin that talks to docker-compose command-line interface
Apache License 2.0
12 stars 4 forks source link

docker-compose up --build #7

Closed italktothewind closed 4 years ago

italktothewind commented 4 years ago

I want to recreate the command "docker-compose up --build" that rebuilds the images in the compose defined in the following way:

  mv-app:
    hostname: mv-app
    build:
      context: .
      dockerfile: myDockerfile

Any advice? Thanks!

mjagus commented 4 years ago

This is not yet supported unfortunately. This seems like a quite useful feature so I will try to add it as soon as possible.

mjagus commented 4 years ago

This is now available in 0.9.0 version of the plugin as a new property of up goal called forceBuild. You can refer to the README for a bit more info if necessary.

Just update the plugin and set the property in your pom.xml as follows:

<configuration>
    <forceBuild>true</forceBuild>
</configuration>
italktothewind commented 4 years ago

Thanks for adding this feature :)