public static void pushImageTag ( DockerClient docker , String imageName , List < String > imageTags , Log log , boolean skipPush ) throws MojoExecutionException , DockerException , IOException , InterruptedException { if ( skipPush ) { log . info ( "Skipping docker push" ) ; return ; } // tags should not be empty if you have specified the option to push tags if ( imageTags . isEmpty ( ) ) { throw new MojoExecutionException ( "You have used option \"pushImageTag\" but have" + " not specified an \"imageTag\" in your" + " docker-maven-client's plugin configuration" ) ; } final CompositeImageName compositeImageName = CompositeImageName . create ( imageName , imageTags ) ; for ( final String imageTag : compositeImageName . getImageTags ( ) ) { final String imageNameWithTag = compositeImageName . getName ( ) + ":" + imageTag ; log . info ( "Pushing " + imageNameWithTag ) ; docker . push ( imageNameWithTag , new AnsiProgressHandler ( ) ) ; } }
push just the tags listed in the pom rather than all images using imageName