Open debu999 opened 5 hours ago
Same with latest docker version
> raise HTTPError(http_error_msg, response=self)
E requests.exceptions.HTTPError: 404 Client Error: Not Found for url: http+docker://localhost/v1.47/containers/30d4dd0a66cb900c585da15a0614e87ea1539ca6b196cccd456b11a158e03b1a/json
following is the configuraration
import pytest
os.environ["RYUK_CONTAINER_IMAGE"] = "testcontainers/ryuk:0.9.0"
from testcontainers.kafka import RedpandaContainer
@pytest.fixture(scope="session") def kafka_container(): with RedpandaContainer( image="docker.redpanda.com/redpandadata/redpanda:v24.2.11" ) as redpanda: bootstrap_server = redpanda.get_bootstrap_server() yield {"bootstrap_servers": bootstrap_server} #
def test_multiply(kafka_container): assert 5 == 10 // 2 bs = kafka_container["bootstrap_servers"] print(bs)
import os
import pytest
os.environ["RYUK_CONTAINER_IMAGE"] = "testcontainers/ryuk:0.10.0"
from testcontainers.kafka import RedpandaContainer
@pytest.fixture(scope="session") def kafka_container(): with RedpandaContainer( image="docker.redpanda.com/redpandadata/redpanda:v24.2.11" ) as redpanda: bootstrap_server = redpanda.get_bootstrap_server() yield {"bootstrap_servers": bootstrap_server} #
def test_multiply(kafka_container): assert 5 == 10 // 2 bs = kafka_container["bootstrap_servers"] print(bs)
==================== 1 warning, 1 error in 71.20s (0:01:11) ==================== ERROR [100%]Pulling image testcontainers/ryuk:0.10.0 Container started: 8e5bae5b0aa5
test setup failed self = <docker.api.client.APIClient object at 0x104a40b90> response = <Response [404]>
/Users/../Library/Caches/pypoetry/virtualenvs/github-actions-utils-3raOMR1u-py3.13/lib/python3.13/site-packages/docker/api/client.py:275:
self = <Response [404]>
/Users/../Library/Caches/pypoetry/virtualenvs/github-actions-utils-3raOMR1u-py3.13/lib/python3.13/site-packages/requests/models.py:1024: HTTPError
The above exception was the direct cause of the following exception:
test_messaging.py:12:
/Users/../Library/Caches/pypoetry/virtualenvs/github-actions-utils-3raOMR1u-py3.13/lib/python3.13/site-packages/testcontainers/core/container.py:126: in enter return self.start() /Users/../Library/Caches/pypoetry/virtualenvs/github-actions-utils-3raOMR1u-py3.13/lib/python3.13/site-packages/testcontainers/kafka/_redpanda.py:70: in start super().start() /Users/../Library/Caches/pypoetry/virtualenvs/github-actions-utils-3raOMR1u-py3.13/lib/python3.13/site-packages/testcontainers/core/container.py:89: in start Reaper.get_instance() /Users/../Library/Caches/pypoetry/virtualenvs/github-actions-utils-3raOMR1u-py3.13/lib/python3.13/site-packages/testcontainers/core/container.py:207: in get_instance Reaper._instance = Reaper._create_instance() /Users/../Library/Caches/pypoetry/virtualenvs/github-actions-utils-3raOMR1u-py3.13/lib/python3.13/site-packages/testcontainers/core/container.py:238: in _create_instance wait_for_logs(Reaper._container, r".* Started!") /Users/../Library/Caches/pypoetry/virtualenvs/github-actions-utils-3raOMR1u-py3.13/lib/python3.13/site-packages/testcontainers/core/waiting_utils.py:109: in wait_for_logs stdout = container.get_logs()[0].decode() /Users/../Library/Caches/pypoetry/virtualenvs/github-actions-utils-3raOMR1u-py3.13/lib/python3.13/site-packages/testcontainers/core/container.py:187: in get_logs return self._container.logs(stderr=False), self._container.logs(stdout=False) /Users/../Library/Caches/pypoetry/virtualenvs/github-actions-utils-3raOMR1u-py3.13/lib/python3.13/site-packages/docker/models/containers.py:322: in logs return self.client.api.logs(self.id, kwargs) /Users/../Library/Caches/pypoetry/virtualenvs/github-actions-utils-3raOMR1u-py3.13/lib/python3.13/site-packages/docker/utils/decorators.py:19: in wrapped return f(self, resource_id, *args, *kwargs) /Users/../Library/Caches/pypoetry/virtualenvs/github-actions-utils-3raOMR1u-py3.13/lib/python3.13/site-packages/docker/api/container.py:896: in logs output = self._get_result(container, stream, res) /Users/../Library/Caches/pypoetry/virtualenvs/github-actions-utils-3raOMR1u-py3.13/lib/python3.13/site-packages/docker/api/client.py:483: in _get_result return self._get_result_tty(stream, res, self._check_is_tty(container)) /Users/../Library/Caches/pypoetry/virtualenvs/github-actions-utils-3raOMR1u-py3.13/lib/python3.13/site-packages/docker/utils/decorators.py:19: in wrapped return f(self, resource_id, args, kwargs) /Users/../Library/Caches/pypoetry/virtualenvs/github-actions-utils-3raOMR1u-py3.13/lib/python3.13/site-packages/docker/api/client.py:479: in _check_is_tty cont = self.inspect_container(container) /Users/../Library/Caches/pypoetry/virtualenvs/github-actions-utils-3raOMR1u-py3.13/lib/python3.13/site-packages/docker/utils/decorators.py:19: in wrapped return f(self, resource_id, *args, **kwargs) /Users/../Library/Caches/pypoetry/virtualenvs/github-actions-utils-3raOMR1u-py3.13/lib/python3.13/site-packages/docker/api/container.py:793: in inspect_container return self._result( /Users/../Library/Caches/pypoetry/virtualenvs/github-actions-utils-3raOMR1u-py3.13/lib/python3.13/site-packages/docker/api/client.py:281: in _result self._raise_for_status(response) /Users/../Library/Caches/pypoetry/virtualenvs/github-actions-utils-3raOMR1u-py3.13/lib/python3.13/site-packages/docker/api/client.py:277: in _raise_for_status raise create_api_error_from_http_exception(e) from e
e = HTTPError('404 Client Error: Not Found for url: http+docker://localhost/v1.44/containers/8e5bae5b0aa5bc78ead931e57d4d4edccfb02d52ec011e6933b1691e09787740/json')
/Users/../Library/Caches/pypoetry/virtualenvs/github-actions-utils-3raOMR1u-py3.13/lib/python3.13/site-packages/docker/errors.py:39: NotFound
Process finished with exit code 1