Skip to content

feat: install gh CLI and disable debuginfod #104

Description

@gabrielfrasantos

Problem

Two quality-of-life gaps affect every project using this devcontainer:

  1. gh is missing — the GitHub CLI is not installed, so any workflow that uses gh (issue/PR creation, release management, etc.) requires manual installation after container creation.

  2. GDB 17.1 stalls on startup — newer GDB versions have debuginfod enabled by default. Without a DEBUGINFOD_URLS override they attempt to reach external servers on every debug session, causing multi-second hangs and noisy warnings when no internet path exists to the configured endpoints.

Proposed fix

Install gh from the official CLI apt repository

The Ubuntu universe package (2.46.0-4) is stale. The official GitHub apt source ships the current release (2.97.0 as of this writing) and tracks upstream:

RUN curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg \
      | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg \
 && echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" \
      > /etc/apt/sources.list.d/github-cli.list \
 && apt-get update \
 && apt-get install -y gh

Set DEBUGINFOD_URLS to empty

In devcontainer.json containerEnv:

"DEBUGINFOD_URLS": ""

This is the documented, environment-level way to disable debuginfod queries — it applies to GDB launched from the terminal, from VSCode, and from any script, with no per-launch-config changes required.

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