@Before
    public void setupLocalServer() throws Exception {
        // Set up a local Jetty HTTP server
        Server server = new Server();
        server.addConnector(new SocketConnector());
        ResourceHandler resourceHandler = new ResourceHandler();
        resourceHandler.setResourceBase("src/test/resources/server");
        server.addHandler(resourceHandler);
        server.start();

        // The server will have a random port assigned, so capture that
        localPort = server.getConnectors()[0].getLocalPort();
    }
Test that a browser running in a container can access a web server hosted on the host machine (i.e. the one running
the tests)
modules/selenium/src/test/java/org/testcontainers/junit/LocalServerWebDriverContainerTest.java