Skip to content

build(docker): Add optional debuginfod volume#220

Draft
cleithner-comcast wants to merge 1 commit into
mainfrom
cleith/dev/sharedDebuginfoDCache
Draft

build(docker): Add optional debuginfod volume#220
cleithner-comcast wants to merge 1 commit into
mainfrom
cleith/dev/sharedDebuginfoDCache

Conversation

@cleithner-comcast
Copy link
Copy Markdown
Contributor

This commit adds an optional debuginfod volume compose file. If there is a DEBUGINFOD_CACHE_PATH environment variable set, it will use that. Else, it will use the default $HOME/.cache/debuginfod_client path. This will allow people to persist a cache across BartonCore containers.

This commit adds an optional debuginfod volume compose file. If there is
a DEBUGINFOD_CACHE_PATH environment variable set, it will use that.
Else, it will use the default $HOME/.cache/debuginfod_client path. This
will allow people to persist a cache across BartonCore containers.
Copilot AI review requested due to automatic review settings May 22, 2026 16:00
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds support for persisting a host-side debuginfod client cache into BartonCore containers, intended to avoid repeated debug symbol downloads across container runs (CLI and devcontainer workflows).

Changes:

  • Add -D flag to dockerw to bind-mount the host’s debuginfod cache path and export DEBUGINFOD_CACHE_PATH into the container.
  • Extend docker/setupDockerEnv.sh to write HOST_DEBUGINFOD_CACHE (and DEBUGINFOD_CACHE_PATH) into docker/.env when a host cache directory exists.
  • Introduce a Docker Compose override (docker/compose.debuginfod-cache.yaml) and include it in the devcontainer compose stack.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
dockerw Adds -D option to mount and export debuginfod cache path for CLI container runs.
docker/setupDockerEnv.sh Emits debuginfod cache environment variables into docker/.env for compose-based workflows.
docker/compose.debuginfod-cache.yaml New compose override to mount host debuginfod cache into the barton service.
.devcontainer/devcontainer.json Adds the new compose override to the devcontainer compose file list.

Comment on lines +10 to +11
"../docker/compose.devcontainer.yaml",
"../docker/compose.debuginfod-cache.yaml"
Comment thread docker/setupDockerEnv.sh
Comment on lines +183 to +189
# debuginfod cache: if the host has a cache directory, record its path so it can be
# bind-mounted into the container via the compose.debuginfod-cache.yaml overlay.
HOST_DEBUGINFOD_CACHE="${DEBUGINFOD_CACHE_PATH:-$HOME/.cache/debuginfod_client}"
if [ -d "$HOST_DEBUGINFOD_CACHE" ]; then
echo "HOST_DEBUGINFOD_CACHE=$HOST_DEBUGINFOD_CACHE" >> $OUTFILE
echo "DEBUGINFOD_CACHE_PATH=$HOST_DEBUGINFOD_CACHE" >> $OUTFILE
fi
Comment on lines +46 to +51
services:
barton:
volumes:
- ${HOST_DEBUGINFOD_CACHE}:${HOST_DEBUGINFOD_CACHE}:cached
environment:
- DEBUGINFOD_CACHE_PATH=${HOST_DEBUGINFOD_CACHE}
Comment thread dockerw
Comment on lines +57 to +62
D) # mount host debuginfod cache into container
_cache="${DEBUGINFOD_CACHE_PATH:-$HOME/.cache/debuginfod_client}"
if [ -d "$_cache" ]; then
DEBUGINFOD_CACHE_VOL="-v $_cache:$_cache:cached"
EXTRA_ENV="${EXTRA_ENV} -e DEBUGINFOD_CACHE_PATH=$_cache"
else
@cleithner-comcast cleithner-comcast marked this pull request as draft May 29, 2026 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants