You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running the code I lookup the Docker Desktop - and I can see that the container gets created, starts running and then instantly exits (with code 0).
What looks odd is that port mapping actually is 0:22 - so it apparently failed to assign a random port of my local machine.
When I select a port for the mapping, e.g. .WithPortBinding(55548, 22), the mapping in the Docker Desktop looks fine (55548:22) - but the container still exits instantly.
The exception that I get in the code is: System.TimeoutException : The operation has timed out.
Everything is fine when I use testcontainers/helloworld:1.1.0 image, with the following code:
The container stands up and runs properly - and I can successfully hit it with http request (via HttpClinet()).
So I am wondering if I am missing something or there is an issue with this image. testcontainers/helloworld does not meet my requirements as I need an instance with a sshd running to test my ssh/sftp client locally.
My OS is Windows 10.
The text was updated successfully, but these errors were encountered:
This image is used by the testcontainers libraries to provide an SSH tunnel, exposing host ports to a container. We fixed this in #7, so switching to testcontainers/ssh:1.2.0 would work out-of-the-box for you.
Hi, I'm trying to run a test container based on
testcontainers/sshd:1.1.0 image
.Here is my code that attempts to do so:
When running the code I lookup the
Docker Desktop
- and I can see that the container gets created, starts running and then instantly exits (with code 0).What looks odd is that port mapping actually is
0:22
- so it apparently failed to assign a random port of my local machine.When I select a port for the mapping, e.g.
.WithPortBinding(55548, 22)
, the mapping in the Docker Desktop looks fine (55548:22
) - but the container still exits instantly.The exception that I get in the code is:
System.TimeoutException : The operation has timed out.
Everything is fine when I use
testcontainers/helloworld:1.1.0
image, with the following code:The container stands up and runs properly - and I can successfully hit it with http request (via
HttpClinet()
).So I am wondering if I am missing something or there is an issue with this image.
testcontainers/helloworld
does not meet my requirements as I need an instance with a sshd running to test my ssh/sftp client locally.My OS is Windows 10.
The text was updated successfully, but these errors were encountered: