Closed mud5150 closed 1 year ago
I also found this problem to be present in last month's Azure image cimg/azure:2022.08
Looking into this.
The ability to use DNS seems to be working fine on the image. I ran some tests here: https://app.circleci.com/pipelines/github/felicianotech/cci-testing-pub/802/workflows/8523e1fa-0413-478b-9c53-4601b9289458/jobs/1814
Perhaps this is an issue with the Docker orb rather than this image. The Docker orb is using a fairly old image for the executor. Also, starting with the September base image, by default Ubuntu 22.04 is used instead of 20.04. The default executor for the orb is 20.04.
In the short term, try using 2022.09-20.04
and see if that helps? In the long-term, I think this is likely a Docker orb issue. I will move this issue over to that project.
Hey @mud5150,
Thank you for opening this issue and providing us with detailed examples. I went ahead tested the publish
job with a dockerfile starting with FROM cimg/base:2022.09
. I subsequently ran multiple curl
and wget
commands in the Dockerfile to test the network access. I was able to run the job successfully and had no issues.
I am going to close out this issue for now but if this still persists, please feel free to re-open.
Thanks again!
Best, Brian
Problem
I am trying to build a new container image to use on CircleCI, so my Dockerfile starts with
I am using the Docker orb default publish job to attempt to build my new image. During the build process any command that requires network access fails with
getaddrinfo() thread failed to start
, which appears to be a DNS failure within the running context of the container build. To verify this I did some testing by SSHing into the hosted runner and manually executing commands against container instances .Testing
When I start a container instance from the current 2022.09 convenience images on a CircleCI hosted runner, processes within the container are unable to perform dns lookups. Other images, including
cimg/base:2022.08
don't have this issue. You can easily verify this by runningdocker run --rm -it cimg/base:2022.09 /usr/bin/curl google.com
from within the hosted runner.Interesting data points
use-remote-docker
option in the orb./etc/hosts
on the 2022.09 imageExamples
These examples were collected by SSHing into a machine based runner
Fails
Works