forked from testcontainers/testcontainers-python
-
Notifications
You must be signed in to change notification settings - Fork 0
feat: reusable containers #1
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
Open
matthiasschaub
wants to merge
34
commits into
main
Choose a base branch
from
reusable_containers
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65e70c8
to
d07e50a
Compare
44660f1
to
74c8df1
Compare
adresses testcontainers#109 Co-authored-by: Levi Szamek <[email protected]>
50e6160
to
e87e782
Compare
do not create Ryuk cleanup instance if reuse enabled and container has been start with `with_reuse`
🤖 I have created a release *beep* *boop* --- ## [4.9.1](testcontainers/testcontainers-python@testcontainers-v4.9.0...testcontainers-v4.9.1) (2025-01-21) ### Bug Fixes * milvus healthcheck: use correct requests errors ([testcontainers#759](testcontainers#759)) ([78b137c](testcontainers@78b137c)) * **mysql:** add dialect parameter instead of hardcoded mysql dialect ([testcontainers#739](testcontainers#739)) ([8d77bd3](testcontainers@8d77bd3)) * **tests:** replace dind-test direct docker usage with sdk ([testcontainers#750](testcontainers#750)) ([ace2a7d](testcontainers@ace2a7d)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…estcontainers#769) When invoking `.start()` multiple times on the same `DockerContainer` instance, the call fails with `ValueError: The org.testcontainers namespace is reserved for internal use` error. Example code: ``` from testcontainers.core.container import DockerContainer container = DockerContainer("alpine:latest").with_kwargs(labels={}) container.start() container.stop() container.start() ``` The fix is to update labels for the container in a copy of the user-provided dictionary, so that: * the code doesn't mutate user structures * avoid side effects, allowing for multiple .start() invocations
Fixed a typo which I ran into while working a bugfix.
testcontainers#766) @alexanderankin We already discussed last year that we only want to support the latest Keycloak version. I added the `latest` tag to test parameterization so we get a better feedback for future Keycloak updates. Fixes testcontainers#764 --------- Co-authored-by: David Ankin <[email protected]>
…ers#773) This closes testcontainers#772 --------- Co-authored-by: David Ankin <[email protected]>
Make sure the test covers the intended behaviour. Previously it was executing the create_labels function without actually verifying there are no side effects.
use convention for getting ip and port instead of hardcoding DIND mode
🤖 I have created a release *beep* *boop* --- ## [4.9.2](testcontainers/testcontainers-python@testcontainers-v4.9.1...testcontainers-v4.9.2) (2025-02-26) ### Bug Fixes * Change env var disabling OpenSearch security plugin ([testcontainers#773](testcontainers#773)) ([2620d7f](testcontainers@2620d7f)) * **core:** create_label test ([testcontainers#771](testcontainers#771)) ([7517297](testcontainers@7517297)) * **core:** multiple container start invocations with custom labels ([testcontainers#769](testcontainers#769)) ([3e783a8](testcontainers@3e783a8)) * **keycloak:** Fixed Keycloak testcontainer for latest version v26.1.0 ([testcontainers#766](testcontainers#766)) ([b1642e9](testcontainers@b1642e9)) * **scylla:** scylla get cluster method ([testcontainers#778](testcontainers#778)) ([46913c1](testcontainers@46913c1)) ### Documentation * Fixed typo in CONTRIBUTING.md ([testcontainers#767](testcontainers#767)) ([f0bb0f5](testcontainers@f0bb0f5)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This will address the Security issue reported on testcontainers#786 As recommended, `tj-actions/changed-files` was replace replaced with [path-filter](https://github.com/dorny/paths-filter) --------- Co-authored-by: David Ankin <[email protected]>
Add new SocatContainer at testcontainers module that can be used along with other modules as a helper. --------- Co-authored-by: David Ankin <[email protected]>
🤖 I have created a release *beep* *boop* --- ## [4.10.0](testcontainers/testcontainers-python@testcontainers-v4.9.2...testcontainers-v4.10.0) (2025-04-02) ### Features * Add SocatContainer ([testcontainers#795](testcontainers#795)) ([2f9139c](testcontainers@2f9139c)) ### Bug Fixes * **ollama:** make device request a list ([testcontainers#799](testcontainers#799)) ([9497a45](testcontainers@9497a45)) * **security:** Update track-modules job ([testcontainers#787](testcontainers#787)) ([f979525](testcontainers@f979525)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…s#779) fixes testcontainers#537 Use docker_api to determine the `socket_path` (defined in [`UnixHTTPAdapter`](https://github.com/docker/docker-py/blob/db7f8b8bb67e485a7192846906f600a52e0aa623/docker/transport/unixconn.py#L55)). Replaces: testcontainers#710
…ontainers#789) the `with_command` function can actually take an argument with type `list[str]`. Co-authored-by: amirhosein <[email protected]>
Fix: testcontainers#706, testcontainers#614 Now when using kwargs in the Image API, the params are passed correctly into the build ```python with DockerImage(path=dir, tag="test", buildargs={"MY_ARG": "some_arg"}) as image: ``` Added relevant test + updated docstring to better reflect the usage
…tainers#785) closes testcontainers#745 if the docker compose command is provided, use that instead of default one. Co-authored-by: amirhosein <[email protected]>
…ners#803) Trying to improve docs reliability for "latest" version
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.