@NotNull
    private static URL getClasspathResource(
        @NotNull final String resourcePath,
        @NotNull final Set<ClassLoader> classLoaders
    ) {
        final Set<ClassLoader> classLoadersToSearch = new HashSet<>(classLoaders);
        // try context and system classloaders as well
        classLoadersToSearch.add(Thread.currentThread().getContextClassLoader());
        classLoadersToSearch.add(ClassLoader.getSystemClassLoader());
        classLoadersToSearch.add(MountableFile.class.getClassLoader());

        for (final ClassLoader classLoader : classLoadersToSearch) {
            if (classLoader == null) {
                continue;
            }

            URL resource = classLoader.getResource(resourcePath);
            if (resource != null) {
                return resource;
            }

            // Be lenient if an absolute path was given
            if (resourcePath.startsWith("/")) {
                resource = classLoader.getResource(resourcePath.replaceFirst("/", ""));
                if (resource != null) {
                    return resource;
                }
            }
        }

        throw new IllegalArgumentException(
            "Resource with path " +
            resourcePath +
            " could not be found on any of these classloaders: " +
            classLoadersToSearch
        );
    }
Obtains a {@link MountableFile} corresponding to a file on the docker host filesystem.

@param path the path to the resource
@param mode octal value of posix file mode (000..777)
@return a {@link MountableFile} that may be used to obtain a mountable path
core/src/main/java/org/testcontainers/utility/MountableFile.java