From 245b4f9b03b26883572ad29b1f187cfc9e6f1cbe Mon Sep 17 00:00:00 2001 From: VishnuJin Date: Wed, 9 Apr 2025 15:35:52 +0530 Subject: [PATCH] update docs to use the latest version of helloworld image that is also available for windows --- docs/index.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/index.md b/docs/index.md index 00f84f424..9d55323ac 100644 --- a/docs/index.md +++ b/docs/index.md @@ -7,8 +7,8 @@ dotnet add package Testcontainers ```csharp title="Run the Hello World container" // Create a new instance of a container. var container = new ContainerBuilder() - // Set the image for the container to "testcontainers/helloworld:1.1.0". - .WithImage("testcontainers/helloworld:1.1.0") + // Set the image for the container to "testcontainers/helloworld:1.2.0". + .WithImage("testcontainers/helloworld:1.2.0") // Bind port 8080 of the container to a random port on the host. .WithPortBinding(8080, true) // Wait until the HTTP endpoint of the container is available. @@ -21,7 +21,7 @@ await container.StartAsync() .ConfigureAwait(false); // Create a new instance of HttpClient to send HTTP requests. -var httpClient = new HttpClient(); +using httpClient = new HttpClient(); // Construct the request URI by specifying the scheme, hostname, assigned random host port, and the endpoint "uuid". var requestUri = new UriBuilder(Uri.UriSchemeHttp, container.Hostname, container.GetMappedPublicPort(8080), "uuid").Uri;