@Override
    protected void containerIsStarted(InspectContainerResponse containerInfo) {
        if (this.model != null) {
            logger().info("Pulling model: {}. Please be patient.", this.model);

            String url = getBaseEndpoint() + "/models/create";
            String payload = String.format("{\"from\": \"%s\"}", this.model);

            try {
                HttpURLConnection connection = (HttpURLConnection) new URL(url).openConnection();
                connection.setRequestMethod("POST");
                connection.setRequestProperty("Content-Type", "application/json");
                connection.setDoOutput(true);

                try (OutputStream os = connection.getOutputStream()) {
                    os.write(payload.getBytes());
                    os.flush();
                }

                try (
                    BufferedReader br = new BufferedReader(
                        new InputStreamReader(connection.getInputStream(), StandardCharsets.UTF_8)
                    )
                ) {
                    while (br.readLine() != null) {}
                }
                connection.disconnect();
            } catch (IOException e) {
                logger().error("Failed to pull model {}: {}", this.model, e);
            }
            logger().info("Finished pulling model: {}", this.model);
        }
    }
Testcontainers proxy container for the Docker Model Runner service
provided by Docker Desktop.
<p>
Supported images: {@code alpine/socat}
<p>
Exposed ports: 80
core/src/main/java/org/testcontainers/containers/DockerModelRunnerContainer.java