feat: fallback to default socket address when docker.from_env() fails #832
+0
−0
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.
New Container
Context: bumping testcontainers in nixpkgs (NixOS/nixpkgs#417242)
When importing
testcontainers
in the nix sandbox, where Docker is not available, the code now fails with:This is because this call to
docker.from_env()
fails.In the case where this happens, I propose to fall back to the default socket address.
PR Checklist
as we make use of this for detecting Semantic Versioning changes.
all community features will be tagged community-feat,
but we do not want to release minor or major versions due to features or breaking changes outside of core.
So please use
fix(postgres):
orfix(my_new_vector_db):
if you want to add or modify community modules.This may change in the future if we have a separate package released with community modules.
modules/*
(if unsure, look at other existing community modules)
testcontainers.<modulename>.*
and you DO NOT have an
__init__.py
above your module's level.modules/*/tests
README.rst
and hooks in the.. auto-class
and.. title
of your container__init__.py
) and corresponding tests.pyproject.toml
tool.poetry.packages
- see other community modulestool.poetry.extras
with the same name as your module name,we still prefer adding NO EXTRA DEPENDENCIES, meaning
mymodule = []
is the preferred addition(see the notes at the bottom)
git rebase
)Preferred implementation
for the given tools you are triyng to implement.
testcontainers
.