default SELF withFileFromClasspath(String path, String resourcePath) {
        final MountableFile mountableFile = MountableFile.forClasspathResource(resourcePath);

        return ((SELF) this).withFileFromPath(path, Paths.get(mountableFile.getResolvedPath()));
    }
BuildContextBuilder's trait for classpath-based resources.
core/src/main/java/org/testcontainers/images/builder/traits/ClasspathTrait.java