Feature Request
Add support for setting the hostname of a bootc disk image via the config.toml customization file.
Current behavior
The config.toml customization schema does not support a hostname field.
Users cannot set a static hostname at image build time through bootc-image-builder.
Workarounds are fragile:
- Writing
/etc/hostname in the Containerfile via RUN echo does not reliably
survive the ostree /etc management layer
tmpfiles.d works but requires knowledge of ostree internals
- cloud-init
preserve_hostname still requires the file to exist at install time
Expected behavior
[customizations]
hostname = "myhost.domain"
Proposed implementation
bootc install supports injecting files into the target deployment before first
boot via the ostree deployment API. A hostname customization could write directly
to the deployment's /etc/hostname post-install, similar to how root-ssh-authorized-keys
is handled today.
Environment
- bootc-image-builder
- build_revision: a686afe
- build_time: 2026-06-18T11:23:37Z
Feature Request
Add support for setting the hostname of a bootc disk image via the config.toml customization file.
Current behavior
The
config.tomlcustomization schema does not support ahostnamefield.Users cannot set a static hostname at image build time through bootc-image-builder.
Workarounds are fragile:
/etc/hostnamein the Containerfile viaRUN echodoes not reliablysurvive the ostree
/etcmanagement layertmpfiles.dworks but requires knowledge of ostree internalspreserve_hostnamestill requires the file to exist at install timeExpected behavior
Proposed implementation
bootc installsupports injecting files into the target deployment before firstboot via the ostree deployment API. A hostname customization could write directly
to the deployment's
/etc/hostnamepost-install, similar to howroot-ssh-authorized-keysis handled today.
Environment