Code Monkey home page Code Monkey logo

Comments (5)

iAnanich avatar iAnanich commented on May 23, 2024 2

So I used interactive registration shown in GitLab guidelines, which worked until recently when I discovered same problem again.
It appears that not only Docker has to be mounted, but although runner must be configured to use it.

Probably, docker socket mounting is not enough once you register more than one runner on same container/service/volume.
So to make it work, make sure that in runner's config.toml (can be found in volume's root), for all you runners volumes property has docker socket:

# runners defintion
[[runners]]
  volumes = ["/var/run/docker.sock:/var/run/docker.sock", "/cache"]
  # other properties not mentioned here

P.S.: realized that with the help of Portainer, settled up after @tiangolo 's guide Thank You!

from dockerswarm.rocks.

tiangolo avatar tiangolo commented on May 23, 2024 1

It seems like your GitLab runner doesn't have access to Docker. Make sure you create it in a manager node and with the Docker sock volume mounted.

from dockerswarm.rocks.

github-actions avatar github-actions commented on May 23, 2024

Assuming the original issue was solved, it will be automatically closed now. But feel free to add more comments or create new issues.

from dockerswarm.rocks.

iAnanich avatar iAnanich commented on May 23, 2024

I have the same issue, with Docker socket being mounted.
That's how Binds property of container looks like:

"Binds": [
                "/var/run/docker.sock:/var/run/docker.sock",
                "gitlab-runner:/etc/gitlab-runner"
            ],

update: I tried a bit different approach (follow instructions from here after creation of docker container for ci runner), but still have same issue.

Exact error from job logs:

 $ docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
 WARNING! Using --password via the CLI is insecure. Use --password-stdin.
 error during connect: Post http://docker:2375/v1.40/auth: dial tcp: lookup docker on 213.133.98.98:53: no such host
 ERROR: Job failed: exit code 1

It could be worth noting, that I'm using the official GitLab website (not self-hosted).
And I found a few similar issues env vars display their values (not just name). IP was different too, and it seems to point at my hosting provider...

from dockerswarm.rocks.

iAnanich avatar iAnanich commented on May 23, 2024

That was my mistake - I didn't mount Docker socket.

from dockerswarm.rocks.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.