-
Notifications
You must be signed in to change notification settings - Fork 283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide generic DockerContainer with init attributes #236
Labels
Comments
Yes, that's probably a good idea because we already support all the other (less commonly used) arguments through keyword arguments. Are you open to submitting a PR? Regarding |
I'm happy to submit a PR! |
vikahl
added a commit
to vikahl/testcontainers-python
that referenced
this issue
Aug 25, 2022
vikahl
added a commit
to vikahl/testcontainers-python
that referenced
this issue
Aug 25, 2022
Submitted a PR, happy for a review. |
tillahoffmann
added
📦 package: core
✅ close on merge
Issue that will be closed by an open pull request
and removed
🛟 help wanted
good first issue
labels
Feb 16, 2023
vikahl
added a commit
to vikahl/testcontainers-python
that referenced
this issue
Mar 22, 2023
vikahl
added a commit
to vikahl/testcontainers-python
that referenced
this issue
Jun 27, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
First I want to thank you for this very nice and convenient library.
Background
I am using the library for smoke tests for microservices. In these tests I spin up a container and make sure I can e.g., fetch an endpoint and see that the container is built and starts correctly.
The library provides all convenient methods, except for a way to set e.g., ports and env variables in the context manager. To solve this I have subclassed
testcontainers.core.container.DockerContainer
into a class as below:and use it as
Proposal
name
,ports
,env
,volumes
, … can be set as init variables.I saw #114 that removed the previous
GenericContainer
but I don't see a motivation why it was done and why it could not be extended.The text was updated successfully, but these errors were encountered: