private void excludeDockerfile(DefaultFileSet fileSet, File dockerFile) {
        ArrayList<String> excludes =
            fileSet.getExcludes() != null ?
                new ArrayList<>(Arrays.asList(fileSet.getExcludes())) :
                new ArrayList<String>();
        excludes.add(dockerFile.getName());
        fileSet.setExcludes(excludes.toArray(new String[0]));
    }
Create an docker tar archive from the given configuration which can be send to the Docker host for
creating the image.

@param imageName Name of the image to create (used for creating build directories)
@param params Mojos parameters (used for finding the directories)
@param buildConfig configuration for how to build the image
@param log Logger used to display warning if permissions are to be normalized
@param finalCustomizer finalCustomizer to be applied to the tar archive
@return file holding the path to the created assembly tar file
@throws MojoExecutionException
src/main/java/io/fabric8/maven/docker/assembly/DockerAssemblyManager.java