[go: up one dir, main page]

Docker hostname does not resolve while waiting for clair daemon to start

Summary

Customer gets the following when following the docs at https://docs.gitlab.com/ce/ci/examples/container_scanning.html.

Waiting for clair daemon to start
........... Timeout, aborting.

Steps to reproduce

I think the only difference is that the customer is running the build on Kubernetes. This is unconfirmed and there are probably other edge cases.

Example Project

What is the current bug behavior?

The hostname docker does not resolve to docker:6060 causing it to time out. We realised this by removing the -q -O /dev/null options from the wget command for higher verbosity.

What is the expected correct behavior?

docker:6060 should resolve to the clair daemon, retrieving the namespaces endpoint when it comes up and continuing with the scan.

Relevant logs and/or screenshots

--2018-06-25 13:19:40--  http://docker:6060/v1/namespaces
.Resolving docker... failed: Name does not resolve

Output of checks

Results of GitLab environment info

Results of GitLab application Check

Possible fixes

We were able to work around this by changing docker:6060 to localhost:6060 so it connects through the host instead of the container.

I'm not sure if this is a simple documentation update or if we should investigate other methods to identify when the container is up.