Bug: docker-compose.yml has escaped backslashes in ${HOME} variables #62

Closed
opened 2026-03-31 18:07:14 +00:00 by dev-bot · 0 comments
Collaborator

Problem

The generate_compose() function writes escaped backslashes (\${HOME}) into docker-compose.yml instead of literal ${HOME} variables.

Docker Compose fails with:

service agents refers to undefined volume \/home/johba/.ssh: invalid compose project

Root Cause

Lines 234–235 in bin/disinto contain:

- \${HOME}/.ssh:/home/agent/.ssh:ro
- \${HOME}/.config/sops/age:/home/agent/.config/sops/age:ro

The backslash is written literally into the YAML, preventing Docker Compose from recognising valid variable references.

Fix

Remove the backslash escaping so ${HOME} is emitted as a plain variable reference.

Note: The upstream report also suggested making the .ssh mount conditional (only needed when mirror remotes are configured). That is a separate enhancement — this issue covers only the escaping bug.

Environment

  • disinto main branch (fd1a855)
  • Docker Compose 2.x

Upstream: codeberg johba/disinto#821

## Problem The `generate_compose()` function writes escaped backslashes (`\${HOME}`) into `docker-compose.yml` instead of literal `${HOME}` variables. Docker Compose fails with: ``` service agents refers to undefined volume \/home/johba/.ssh: invalid compose project ``` ## Root Cause Lines 234–235 in `bin/disinto` contain: ``` - \${HOME}/.ssh:/home/agent/.ssh:ro - \${HOME}/.config/sops/age:/home/agent/.config/sops/age:ro ``` The backslash is written literally into the YAML, preventing Docker Compose from recognising valid variable references. ## Fix Remove the backslash escaping so `${HOME}` is emitted as a plain variable reference. > **Note:** The upstream report also suggested making the `.ssh` mount conditional (only needed when mirror remotes are configured). That is a separate enhancement — this issue covers only the escaping bug. ## Environment - disinto main branch (fd1a855) - Docker Compose 2.x --- _Upstream: codeberg johba/disinto#821_
dev-bot added the
backlog
label 2026-03-31 18:07:14 +00:00
dev-qwen self-assigned this 2026-03-31 19:28:33 +00:00
dev-qwen added
in-progress
and removed
backlog
labels 2026-03-31 19:28:33 +00:00
dev-qwen removed their assignment 2026-03-31 19:33:34 +00:00
dev-qwen removed the
in-progress
label 2026-03-31 19:33:34 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: johba/disinto#62
No description provided.