Roy Moore
Roy Moore
@CarliJoy Updated with all of the Fixes
please note that ```def get_exposed_port(self, port: str): ...``` is probably wrong as it uses ```python mapped_port = self.get_docker_client().port(self._container.id, port) ``` -> ```python port_mappings = self.client.api.port(container_id, port) ``` -> ```python def...
```python class DockerImage: ... def __init__( self, path: Union[str, PathLike], docker_client_kw: Optional[dict] = None, tag: Optional[str] = None, clean_up: bool = True, dockerfile_path: Union[str, PathLike] = "Dockerfile", no_cache: bool =...
### Workaround Just use the lower level methods ```python def test_something(): image = DockerImage(path="./", tag="new:test") image.build(buildargs={"PIP_EXTRA_INDEX_URL": PIP_EXTRA_INDEX_URL}) with AWSLambdaContainer(image=image, port=8080) as func: # Do Something with the container image.remove() ```
Looks like this needs some more work
@black-snow Updated docstring as you suggested.
Sanity, working normally: Win10 | Python 3.10 | Docker Desktop (WSL2) | testcontainers-v4.4.0   (Core tests are working)  (Redis tests are working) Running test after stopping Docker: ...
Another idea is avoiding this completely and adding a validation before running and/or testing that docker is even available 💡
What i meant @Vasiliy566 is that you can wrap your usage with a try/except and check for this if needed: ```python try: from testcontainers.redis import RedisContainer from docker.errors import DockerException...