Chethana Udatiyawalage
Chethana Udatiyawalage

Reputation: 125

Add --pull to docker maven plugin using io.fabric8 Docker Maven Plugin :0.38.0:stop for parameter pullversion

I want to add --pull to docker maven plugin.I have used io.fabric8 Docker Maven Plugin in 0.38.0 version. But it says Unable to parse configuration of mojo io.fabric8:docker-maven-plugin:0.38.0:stop for parameter pull: Cannot find 'pull' in class io.fabric8.maven.docker.config.BuildImageConfiguration

I want to use latest image when I am build my application

                       <plugin>
                        <groupId>io.fabric8</groupId>
                        <artifactId>docker-maven-plugin</artifactId>
                        <version>0.38.0</version>
                        <inherited>false</inherited>
                        <configuration>
                            <images>
                                <image>
                                  <name>rnddockerdev.azurecr.io/ifs/virus-                                    
                                       scanner:${project.version}</name>

                                    <run>
                                        <ports>
                                            <port>9080:8080</port>
                                            <!--<port>9787:9787</port>-->
                                        </ports>
                                    </run>
                                    <build>
                                        <dockerFile>Dockerfile</dockerFile>
                                        <dockerFileDir>${project.basedir}</dockerFileDir>
                                        <pull>true</pull>
                                    </build>
                                </image>
                            </images>
                        </configuration>
                        <executions>
                            <execution>
                                <phase>package</phase>
                                <goals>
                                    <goal>stop</goal>
                                    <goal>build</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>

   I wanted to have latest image when I build the application.

Upvotes: 0

Views: 43

Answers (1)

Chethana Udatiyawalage
Chethana Udatiyawalage

Reputation: 125

In version 0.31 it works with

**<build>
 <dockerFile>Dockerfile</dockerFile>                                     
 <dockerFileDir>${project.basedir</dockerFileDir>                                      
 <imagePullPolicy>Always</imagePullPolicy>
 </build>** 

                               

in pom.xml

Upvotes: 0

Related Questions