Skip to content

Can't get testcontainers-node to work inside GitlabCI using docker:dind as service #1220

@antoniocordasco

Description

@antoniocordasco

Hi,
I have been trying very hard today and yesterday to get my Testcontainers based test to work inside the gitlab CI but with no success.

I either get:
connect ECONNREFUSED 172.17.0.3:2375

or (when using port 2376 instead of 2375) :
(HTTP code 400) bad parameter - Client sent an HTTP request to an HTTPS server.

I have tried a lot of different combinations of values for the vars: DOCKER_HOST, DOCKER_CERT_PATH, DOCKER_TLS_VERIFY and DOCKER_TLS_CERTDIR, but no luck.

At the moment I have this in my .gitlab-ci.yml
DOCKER_HOST: 'tcp://docker:2376'
DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: "/certs"
DOCKER_CERT_PATH: "/certs/client"
DOCKER_TLS_VERIFY: 1

I have found discussions about the same issue on google with people saying they managed to fix it, but none of their suggestions worked for me.
Any help would be greatly appreciated

Thank you
Antonio

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions