-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't error if resolv.conf does not exists #8111
Don't error if resolv.conf does not exists #8111
Conversation
If the resolv.conf file is empty we provide default dns servers. If the file does not exists we error and don't create the container. We should also provide the default entries in this case. This is also what docker does. Fixes containers#8089 Signed-off-by: Paul Holzinger <[email protected]>
Can you add a test? Take the ALPINE image, build a new version with resolv.conf removed, and ensure a container made from it starts successfully? |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Luap99, mheon The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@mheon I'm talking about the /etc/resolv.conf file on the host. I don't think I should remove this file in the CI test VMs. |
Ah, yes, we can't really test for that easily! |
LGTM |
Thanks @Luap99 |
/hold cancel |
If the resolv.conf file is empty we provide default dns servers.
If the file does not exists we error and don't create the
container. We should also provide the default entries in this
case. This is also what docker does.
Fixes #8089