private BuildImageConfiguration createBuildImageConfiguration(DockerComposeServiceWrapper mapper,
                                                                  File composeParent,
                                                                  ImageConfiguration imageConfig,
                                                                  DockerComposeConfiguration handlerConfig) {
        BuildImageConfiguration buildConfig = imageConfig.getBuildConfiguration();
        if (handlerConfig.isIgnoreBuild() || !mapper.requiresBuild()) {
            if (serviceMatchesAlias(mapper, imageConfig)) {
                // Only when the specified image name maps to the current docker-compose service
                return buildConfig;
            } else {
                return null;
            }
        }

        // Build from the specification as given in the docker-compose file
        BuildImageConfiguration.Builder builder = new BuildImageConfiguration.Builder(buildConfig)
                .dockerFile(extractDockerFilePath(mapper, composeParent))
                .args(mapper.getBuildArgs());
        return builder.build();
    }
Docker Compose handler for allowing a docker-compose file to be used
to specify the docker images.
src/main/java/io/fabric8/maven/docker/config/handler/compose/DockerComposeConfigHandler.java