private void verifyAssemblyReferenced(File dockerFile, FixedStringSearchInterpolator interpolator, Logger log, AssemblyConfiguration assemblyConfig) throws IOException {
        String name = assemblyConfig.getName();
        for (String keyword : new String[] { "ADD", "COPY" }) {
            List<String[]> lines = DockerFileUtil.extractLines(dockerFile, keyword, interpolator);
            for (String[] line : lines) {
                if (line[0].startsWith("#")) {
                    // Skip comment lines
                    continue;
                }

                // Skip command flags like --chown
                String firstArg = firstNonOptionArgument(line);

                // contains an ADD/COPY ... targetDir .... All good.
                if (firstArg != null && firstArg.contains(name)) {
                    return;
                }
            }
        }
        log.warn("Dockerfile %s does not contain an ADD or COPY directive to include assembly created at %s. Ignoring assembly.",
                 dockerFile.getPath(), name);
    }
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