testcontainers-dotnet
testcontainers-dotnet copied to clipboard
SQL Image results in - NotFound, response={"message":"No such image: ghcr.io/psanetra/ryuk:2021.12.20"}
Describe the bug
Given a configuration to create an azure sql server edge docker container, we get an error stating that NotFound, response={"message":"No such image: ghcr.io/psanetra/ryuk:2021.12.20"
To Reproduce Use the below config and start the container
new TestcontainersBuilder<TestcontainersContainer>()
.WithImage("mcr.microsoft.com/azure-sql-edge")
.WithEnvironment("SA_PASSWORD", Password)
.WithEnvironment("ACCEPT_EULA", "Y")
.WithPortBinding(Port, Port)
.WithName(DirectoryApiConstants.Name + ".Tests")
.WithWaitStrategy(
Wait.ForUnixContainer()
.UntilPortIsAvailable(Port)
.UntilOperationIsSucceeded(() =>
{
try
{
CreateDatabases();
}
catch (SqlException e)
{
Console.WriteLine($"Failed to create DB, retrying. {e.Message}", e);
Task.Delay(1000).Wait();
return false;
}
return true;
}, 120))
.Build();
Expected behavior Starts up a instance of the azure sql edge container.
Screenshots
Unhandled exception. Docker.DotNet.DockerImageNotFoundException: Docker API responded with status code=NotFound, response={"message":"No such image: ghcr.io/psanetra/ryuk:2021.12.20"}
at Docker.DotNet.ContainerOperations.<>c.<.cctor>b__30_1(HttpStatusCode statusCode, String responseBody)
at Docker.DotNet.DockerClient.HandleIfErrorResponseAsync(HttpStatusCode statusCode, HttpResponseMessage response, IEnumerable`1 handlers)
at Docker.DotNet.DockerClient.MakeRequestAsync(IEnumerable`1 errorHandlers, HttpMethod method, String path, IQueryString queryString, IRequestContent body, IDictionary`2 headers, TimeSpan timeout, CancellationToken token)
at Docker.DotNet.ContainerOperations.CreateContainerAsync(CreateContainerParameters parameters, CancellationToken cancellationToken)
at DotNet.Testcontainers.Clients.DockerContainerOperations.RunAsync(ITestcontainersConfiguration configuration, CancellationToken ct)
at DotNet.Testcontainers.Clients.TestcontainersClient.RunAsync(ITestcontainersConfiguration configuration, CancellationToken ct)
at DotNet.Testcontainers.Containers.TestcontainersContainer.Create(CancellationToken ct)
at DotNet.Testcontainers.Containers.TestcontainersContainer.StartAsync(CancellationToken ct)
at DotNet.Testcontainers.Containers.ResourceReaper.GetAndStartNewAsync(Guid sessionId, IDockerEndpointAuthenticationConfiguration dockerEndpointAuthConfig, String ryukImage, TimeSpan initTimeout, CancellationToken ct)
at DotNet.Testcontainers.Containers.ResourceReaper.GetAndStartNewAsync(Guid sessionId, IDockerEndpointAuthenticationConfiguration dockerEndpointAuthConfig, String ryukImage, TimeSpan initTimeout, CancellationToken ct)
at DotNet.Testcontainers.Containers.ResourceReaper.GetAndStartDefaultAsync(IDockerEndpointAuthenticationConfiguration dockerEndpointAuthConfig, CancellationToken ct)
at DotNet.Testcontainers.Clients.TestcontainersClient.RunAsync(ITestcontainersConfiguration configuration, CancellationToken ct)
at DotNet.Testcontainers.Containers.TestcontainersContainer.Create(CancellationToken ct)
at DotNet.Testcontainers.Containers.TestcontainersContainer.StartAsync(CancellationToken ct)
at Program.<Main>$(String[] args) in C:\repos\packing\directory-api\tools\Whds.Directory.Up\Program.cs:line 11
at Program.<Main>(String[] args)
Process finished with exit code -532,462,766.
Desktop (please complete the following information):
- Version [e.g. 22]
Additional context Add any other context about the problem here.
I have seen this issue https://github.com/testcontainers/testcontainers-dotnet/issues/487#issue-1280073704 but not sure I followed if there was a fix for it, or if it just went away.
The same applies here as mentioned in: https://github.com/testcontainers/testcontainers-dotnet/issues/487#issuecomment-1163185930. The image is available.
@mumby0168 could you please test it with one of the latest snapshot versions, like 2.2.0-beta.2835065501
?
@HofmeisterAn Hi! Sorry to bother, I am just trying it with the latest snapshot version and trying to create a selenium-hub. I'm getting this:
Docker API responded with status code=NotFound, response={"message":"No such image: testcontainers/ryuk0.3.4"}
Any suggestion?
What Docker engine do you use (docker info
)? Do you use a proxy? Private registry? Dose docker pull testcontainers/ryuk0.3.4
work?
I am using Docker Community Engine 19.03.5 - I am under a vpn, can that be the issue ? The private registry is not being set up on this project, so it should not be in use.
docker pull testcontainers/ryuk0.3.4
returns Get https://registry-1.docker.io/v2/: dial tcp read: connection refused
Sorry, there was a typo, it is docker pull testcontainers/ryuk:0.3.4
.
No problem. I m getting the same result anyways..
I am under a vpn, can that be the issue ?
Yes. It looks like you are not able to pull images from Docker Hub. I have not found an official list, but Sonatype listing these.
Makes sense, thanks for the quick response. I will try it out without the VPN. Thanks again!
I'll close this issue. Don't hesitate to reopen it again if you have any further questions or problems.
The latest version 2.1.0
fixed this issue for me.
@mumby0168 I was trying it with 2.2.0-beta, but seems the problem is related to the vpn I am working with.