Skip to content

No DNS inside bootc #22

Description

@mpiscaer

There is no DNS resolving possible inside of the image:

❯ bcvk ephemeral run-ssh "ghcr.io/bootcrew/ubuntu-bootc:latest-amd64" -- wget http://www.google.com
--2026-09-10 10:14:31--  http://www.google.com/
Resolving www.google.com (www.google.com)... failed: Temporary failure in name resolution.
wget: unable to resolve host address ‘www.google.com’

This because the /etc/resolv.conf is empty:

root@localhost:/var/roothome# ls -l /etc/resolv.conf
-rw-r--r-- 1 root root 0 Jun 10 02:13 /etc/resolv.conf

Because of this empty file the tmpfiles: /usr/lib/tmpfiles.d/resolv-conf.conf will not create the soft link to the correct systemd-resolve stub file

root@localhost:/var/roothome# cat /run/systemd/resolve/stub-resolv.conf
# This is /run/systemd/resolve/stub-resolv.conf managed by man:systemd-resolved(8).
# Do not edit.
#
# This file might be symlinked as /etc/resolv.conf. If you're looking at
# /etc/resolv.conf and seeing this text, you have followed the symlink.
#
# This is a dynamic resolv.conf file for connecting local clients to the
# internal DNS stub resolver of systemd-resolved. This file lists all
# configured search domains.
#
# Run "resolvectl status" to see details about the uplink DNS servers
# currently in use.
#
# Third party programs should typically not access this file directly, but only
# through the symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a
# different way, replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.

nameserver 127.0.0.53
options edns0 trust-ad
search .
root@localhost:/var/roothome#


Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions