Skip to content

Add hostname customization to config.toml #2499

Description

@yweiser-redseal

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/blueprintsRelated to blueprints.area/bootcRelated to bootable containers.enhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions