-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Description
When running testcontainers in GitLab CI with dind-rootless service, it does not work when connecting via tcp.
It works with dind (rootful):
.gitlab-ci.yml:
test:
stage: test
image: php:8.3-cli
services:
- docker:29-dind
variables:
DOCKER_HOST: tcp://docker:2375
DOCKER_TLS_CERTDIR: ""Doesn't work with dind-rootless (Exact same setup works with testcontainers-dotnet)
.gitlab-ci.yml:
test:
stage: test
image: php:8.3-cli
services:
- docker:29-dind-rootless
variables:
DOCKER_HOST: tcp://docker:2375
DOCKER_TLS_CERTDIR: ""
TESTCONTAINERS_RYUK_DISABLED: trueThis is the error:
1) Exception in third-party event subscriber: Cannot read the response
#0 /builds/group/project/vendor/php-http/socket-client/src/Client.php(85): Http\Client\Socket\Client->readResponse()
#1 /builds/group/project/vendor/php-http/client-common/src/HttpClientDecorator.php(28): Http\Client\Socket\Client->sendRequest()
It works when binding the dind docker socket though:
.gitlab-ci.yml:
test-php:
stage: test
image: php:8.3-cli
services:
- name: docker:29-dind-rootless
variables:
DOCKER_HOST: "unix:///runner/services/docker/docker.sock"
TESTCONTAINERS_RYUK_DISABLED: true
TESTCONTAINERS_HOST_OVERRIDE: dockerIn /etc/gitlab-runner/config.toml
volumes = ["/runner/services/docker", "/cache"]
Metadata
Metadata
Assignees
Labels
No labels