Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update GitLab CI docs: Add --tls=false to docker-in-docker to avoid startup delays #4573

Merged

Conversation

ulrichwinter
Copy link
Contributor

Starting the docker:dind service in GitLab CI without --tls=false leads to the following warning within the docker sidecar container:

Binding to an IP address without --tlsverify is deprecated. Startup is intentionally being slowed down to show this message

If a gitlab-ci build job accesses the docker api right at the start, the job might fail.

This behaviour has been observed with docker 20.10.9 and a kubernetes-executor for the gitlab-runner.
It can be reproduced with the pipeline job below, but the public gitlab runner from gitlab.com is not affected by this behaviour.

Therefore I suggest to provide a hint to this --tls=false argument within the testcontainer docs.

# DinD service is required for Testcontainers
services:
  - docker:dind

variables:
  # Instruct Testcontainers to use the daemon of DinD.
  DOCKER_HOST: "tcp://docker:2375"
  # Instruct Docker not to start over TLS.
  DOCKER_TLS_CERTDIR: ""
  # Improve performance with overlayfs.
  DOCKER_DRIVER: overlay2

test:
  image: docker:20.10.9
  stage: test
  script:
    - docker info

@kiview
Copy link
Member

kiview commented Oct 12, 2021

Hi @ulrichwinter,
thanks a lot for this very helpful hint and corresponding doc update, LGTM 👍

Copy link
Member

@bsideup bsideup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! 👍

@kiview kiview added this to the next milestone Oct 12, 2021
@kiview kiview changed the title docs: add '--tls=false' to docker-in-docker to avoid startup delays Update GitLab CI docs: Add --tls=false to docker-in-docker to avoid startup delays Oct 12, 2021
@kiview kiview merged commit b7e9bb6 into testcontainers:master Oct 12, 2021
@ulrichwinter
Copy link
Contributor Author

That was quick.
Thanks a lot for the support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants