private String readResponse(GenericContainer container, Integer port) throws IOException {
        try (
            Socket socket = Awaitility
                .await()
                .pollDelay(Duration.ofSeconds(1))
                .until(() -> new Socket(container.getHost(), port), Socket::isConnected);
            BufferedReader reader = new BufferedReader(new InputStreamReader(socket.getInputStream()))
        ) {
            return reader.readLine();
        }
    }
Simple socket content reader from given container:port

@param container to query
@param port      to send request to
@return socket reader content
@throws IOException if any
core/src/test/java/org/testcontainers/junit/FixedHostPortContainerTest.java