testcontainers-python
testcontainers-python copied to clipboard
Add documentation to `DockerContainer` in `core`.
Please add docs for the Generic Container. Thanks!
Hi @jamesward, the GenericContainer is deprecated and will be removed in the upcoming 4.x release of testcontainers-python. I'm closing this for now, but please follow up if you have further questions.
Thanks for the heads up! What is the alternative?
GenericContainer was just another name for DockerContainer (see https://github.com/testcontainers/testcontainers-python/blob/v3.7.1/testcontainers/core/generic.py#L62-L65). I hope the latter is documented a bit better, but it could also do with some work.
Ah! Thanks. Also I noticed docs on DockerContainer which I don't remember being there before. I'll give it a try!
Dug in again and I am using DockerContainer and still need some more docs :) For instance, I'm not sure how to wait until a port is listening.
There is some information in https://github.com/testcontainers/testcontainers-python/blob/master/core/testcontainers/core/waiting_utils.py and examples scattered across the repository. But I agree we need better documentation.
What sort of listening do you want to wait for, e.g., HTTP or some other protocol?
Yeah, on my other related projects I use:
Wait.forHttp("/")
Thanks!
I've just discovered testcontainers and have been through some of the docs & tutorials. I kept seeing GenericContainer everywhere so that's the first thing I looked for when I went to prototype, but couldn't find it
It might be an idea to mention in the docs that GenericContainer has been superceded by DockerContainer, at least until the getting started docs can catch up