Roy Moore

Results 75 comments of 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() ```

@black-snow Updated docstring as you suggested.

Sanity, working normally: Win10 | Python 3.10 | Docker Desktop (WSL2) | testcontainers-v4.4.0 ![image](https://github.com/testcontainers/testcontainers-python/assets/7189138/8dcf908c-ae51-40de-9c8f-344dc33b2df1) ![image](https://github.com/testcontainers/testcontainers-python/assets/7189138/62505e64-7d55-4b17-9532-afdd88102f7f) (Core tests are working) ![image](https://github.com/testcontainers/testcontainers-python/assets/7189138/058697bc-76c6-40d1-a31b-8a74c0a987e5) (Redis tests are working) Running test after stopping Docker: ![image](https://github.com/testcontainers/testcontainers-python/assets/7189138/0d10e6d8-c5d9-41f2-a46a-f802524de81c)...

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...