Skip to content

Feature: _debug ​

Description ​

Adds a debug container to the image that provides a writable environment for inspecting an otherwise immutable system.

What it does ​

_debug installs containerd and docker.io along with a script (setup-debugbox-ssh) that creates and starts a debug container on the host. By default, the container is based on a Debian slim image with openssh-server installed and sshd running on port 22, giving SSH access to a writable environment that shares the host network and mounts host system directories.

Two systemd services are installed to create and start the container at boot time. The behavior is controlled by /etc/debugbox.conf:

  • IMAGE — name of the local image (default: debugbox)
  • REGISTRY — optional external registry to pull from
  • CONTAINER_ARCHIVE — optional path to a local container archive
  • CMD — command to run in the container (default: /usr/sbin/sshd -D)

The debug container can also be started from a local archive or pulled from an external registry, in which case the container is used as-is without modification.

WARNING

Do not use this feature in production images. The exposed ssh server imposes a security thread.

Files ​

Files present in this feature and their purpose. See the feature file reference for the semantics of each file type.

FilePurpose
exec.config (ref)Configures the image at build time to enable the debug container services.
info.yaml (ref)Declares type: flag and included/excluded features.
pkg.include (ref)Installs containerd and docker.io to support running the debug container.
file.include/etc/debugbox.conf (file.include)Configuration file for the debug container, controlling the image source, registry, and command.
file.include/etc/systemd/system/setup-debugbox-ssh.service (file.include)Systemd unit that creates and configures the debug container at boot time.
file.include/etc/systemd/system/ssh-container.service (file.include)Systemd unit that starts the debug container and keeps it running.
file.include/usr/sbin/setup-debugbox-ssh (file.include)Script that pulls or loads the container image, installs openssh-server if needed, and starts sshd.

This feature has no include or exclude relationships.