Skip to content

🐛 fix(compose): allow compose files mounted outside app directory#129

Merged
s-b-e-n-s-o-n merged 10 commits intomainfrom
release/v1.4.0-rc.10
Mar 9, 2026
Merged

🐛 fix(compose): allow compose files mounted outside app directory#129
s-b-e-n-s-o-n merged 10 commits intomainfrom
release/v1.4.0-rc.10

Conversation

@s-b-e-n-s-o-n
Copy link
Contributor

Summary

  • Remove overly strict working-directory boundary enforcement from runComposeCommand that rejected compose files bind-mounted outside /home/node/app
  • Bug existed since rc.3 — the boundary check always converted absolute paths to relative via path.relative() then rejected anything outside process.cwd()
  • Compose file paths are operator-configured (Docker labels or env vars), not user input — path traversal protection is unnecessary here
  • Fixes force-update failures for setups with compose files at paths like /drydock/docker-compose.yml (documented mount pattern)

Test plan

  • Existing compose trigger tests pass (204 tests)
  • New test: runComposeCommand accepts compose files outside working directory
  • Updated test: relative paths outside working directory resolve correctly
  • Full backend suite passes (3960 tests)
  • Full UI suite passes (lefthook)
  • Biome + qlty clean

Reported by @flederohr in #120

🤖 Generated with Claude Code

Remove overly strict working-directory boundary enforcement from
runComposeCommand that rejected compose files bind-mounted outside
/home/node/app. This bug existed since rc.3 — the boundary check
always converted absolute paths to relative via path.relative() then
rejected anything outside process.cwd(). Compose file paths are
operator-configured (Docker labels or env vars) and already validated
during resolution, so path traversal protection here is unnecessary.

Fixes force-update failures for setups with compose files at paths
like /drydock/docker-compose.yml (documented mount pattern).
@vercel
Copy link

vercel bot commented Mar 9, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
drydock-website Ready Ready Preview, Comment Mar 9, 2026 9:29pm

@codecov
Copy link

codecov bot commented Mar 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Use Fumadocs Banner component to display pre-release warning across
all docs pages, matching the existing homepage RC banner. Prevents
users from following v1.4 quickstart instructions (argon2id hash)
when running v1.3.9 (SHA hash only).
- Change banner from amber to red for stronger pre-release warning
- Add "this version is not yet released" text to banner
- Change sidebar version picker from "v1.4 (Latest)" to "v1.4 (RC)"
…ffinity filtering

- Self-inspect Drydock's bind mounts to build host→container path mapping
- Remap Docker label paths (com.docker.compose.project.config_files) from
  host-side to container-internal using longest-prefix bind mount matching
- Skip containers whose compose files don't match the trigger's configured
  FILE path, eliminating cross-stack "does not exist" warnings
- Add regression tests for host path remapping and affinity filtering
… test

- Prevent cross-project false positives in getServiceKey() — containers
  with com.docker.compose.service label that doesn't match any service in
  the compose file now return undefined instead of falling through to
  image-name matching
- Skip image-name matching entirely for containers with Docker Compose
  identity labels (project, config_files, working_dir)
- Add regression test verifying YAML AST mutation only updates service
  image fields, not matching strings in comments or env vars
Snyk has a 200 scan/month limit. Only run snyk-deps and snyk-code
on main and release/* branch pushes to conserve quota.
Rename "v1.3.9 stable" to "v1.3.9 release notes →" so users
know the link goes to GitHub release notes, not stable docs.
…tion

- Add promise deduplication to ensureHostToContainerBindMountsLoaded to prevent redundant Docker API calls during concurrent batch processing
- Validate HOSTNAME against Docker container ID/name pattern instead of only rejecting slashes
- Use split(':', 2) in parseHostToContainerBindMount to correctly handle :rw/:ro mount options
- Replace direct _hostToContainerBindMounts field access with protected accessor methods
- Extract resolveAndGroupContainersByComposeFile from triggerBatch to reduce complexity
- Add resetHostToContainerBindMountCache to beforeEach for test isolation
- Add 8 new tests: getSelfContainerIdentifier edge cases, promise deduplication, mount options
@s-b-e-n-s-o-n s-b-e-n-s-o-n merged commit 04cb896 into main Mar 9, 2026
15 checks passed
@s-b-e-n-s-o-n s-b-e-n-s-o-n deleted the release/v1.4.0-rc.10 branch March 9, 2026 21:39
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.

3 participants