I have an unusual use case, for a number of reasons my company asked me to rewrite my application and deploy it using containerd on Kubernets.The app does something similar to Github Actions and Nektos Act using DIND.I managed to create my DIND container and start it
container, err := cli.NewContainer(ctx, containerName,
containerd.WithImage(image),
containerd.WithNewSnapshot(containerName+"-snapshot", image),
containerd.WithNewSpec(
oci.WithImageConfig(image),
oci.WithPrivileged,
oci.WithEnv(containerEnv),
oci.WithMounts(mnts),
),
)
But once the application in the DIND container tries to perform a docker pull, I get the following error:
time="2024-08-01T12:44:17.563714641Z" level=warning msg="Error getting v2 registry: Get https://private-repo.local/v2/: dial tcp: lookup private-repo.local on [::1]:53: read udp [::1]:34343->[::1]:53: read: connection refused"
time="2024-08-01T12:44:17.563756965Z" level=info msg="Attempting next endpoint for pull after error: Get https://private-repo.local/v2/: dial tcp: lookup private-repo.local on [::1]:53: read udp [::1]:34343->[::1]:53: read: connection refused"
time="2024-08-01T12:44:17.563816052Z" level=error msg="Handler for POST /v1.40/images/create returned error: Get https://private-repo.local/v2/: dial tcp: lookup private-repo.local on [::1]:53: read udp [::1]:34343->[::1]:53: read: connection refused"
Can someone help me understand how to exted access to the host network interface and set a specific DNS server ?
I researched the Github project moby/moby
and perform multiple keyword searches on containerd/containerd
without any success.
skj_27 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.