public void tagImage(ImageConfiguration imageConfig) throws DockerAccessException {
        List<String> tags = imageConfig.getBuildConfiguration().getTags();
        if (!tags.isEmpty()) {
            String imageName = imageConfig.getName();
            log.info("%s: Tag with %s", imageConfig.getDescription(), String.join(",", tags));

            BuildImageConfiguration buildConfig = imageConfig.getBuildConfiguration();

            for (String tag : tags) {
                tagImage(imageName, tag, null, buildConfig.cleanupMode());
            }
        }
    }
Create docker archive for building image

@param imageConfiguration image configuration
@param buildContext       docker build context
@param archivePath        build archive only flag, it can have values TRUE or FALSE and also
                          it can hold path to archive where it might get copied over
@return tarball for docker image
@throws MojoExecutionException in case any exception comes during building tarball
src/main/java/io/fabric8/maven/docker/service/BuildService.java