concourse / concourse-docker

Offical concourse/concourse Docker image.
Apache License 2.0
241 stars 153 forks source link

Running a task fails in /opt/resource/check with 'failed to ping registry' #32

Open douardda opened 5 years ago

douardda commented 5 years ago

I am trying to follow the tutorial using the docker-compose.yml to run concourse.

When I try to execute the hello_world task, it fails with:

resource script '/opt/resource/check []' failed: exit status 1

stderr: failed to ping registry: 2 error(s) occurred:

I can curl the docker registry from within the running worker (using a docker-compose exec concourse-worker bash).

My host is running Debian stretch with

Any idea?

Thanks, David

douardda commented 5 years ago

Ok so the problem looks similar to https://github.com/concourse/concourse/issues/2388

I finally found the problem: my network does not allow dns traffic other than the internal dns server, so I have modified the docker-compose file to force using this dns server adding the CONCOURSE_GARDEN_DNS_SERVER environment variable.

This DNS quirck should be documented in the readme file or so, I guess.

kingcoconut commented 5 years ago

I was having this issue when running a task on the amidos/dcind image in privileged mode. I was unable to pull images from my ECR registry. I am running concourse on k8s, deployed via the helm/charts. Setting CONCOURSE_GARDEN_DNS_SERVER to 8.8.8.8 fixed my issue