Skip to content

🐛 fix(devcontainer): docker-compose.override.yml not picked up by JetBrains Gateway rebuilds #718

@codekiln

Description

@codekiln

Problem

PR #712 introduced an optional named volume configuration for JetBrains users to fix OOM crashes from gRPC FUSE file syncing. The configuration uses docker-compose.override.yml (gitignored) to allow JetBrains users to opt into a named volume while keeping Codespaces on bind mount.

However, after multiple rebuilds through JetBrains Gateway UI, the override file is not being picked up. The container still uses the bind mount from base docker-compose.yml:

$ mount | grep /workspace
grpcfuse on /workspace type fuse.grpcfuse (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other,max_read=1048576)

Expected: langstar-workspace named volume
Actual: grpcfuse bind mount

Context

  • JetBrains RustRover via Gateway
  • docker-compose.override.yml correctly configured with:
    • Service-level: - langstar-workspace:/workspace
    • Top-level: langstar-workspace: volume declaration
  • File is present at /workspace/.devcontainer/docker-compose.override.yml
  • Rebuilt container multiple times through Gateway UI
  • Issue persists despite correct configuration

Investigation

According to Docker Compose docs, docker-compose.override.yml should be automatically discovered and merged. However, when invoked through devcontainer.json with:

"dockerComposeFile": "docker-compose.yml"

It appears to only use the explicitly listed file, not the automatic override file discovery.

Initial Analysis

A deep research report at logseq-encode-garden/pages/DevContainer___Report___25___12___Multi-Env DevContainer Setup.md at main · codekiln/logseq-encode-garden found that using separate devcontainer directories has many precedents, and this is likely to be the most scalable solution.

If the devcontainer.json file needs to be kept partly in sync across VS Code, Codespaces and JetBrains, but customized for a local purpose (for example, to give another docker-compose or different bind mount configuration), a json templating language could be used, such as Jsonnet, Cue or Dhall.

Next Actions

TBD

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions