Skip to content

fix: quote bglapi docker volume paths#2

Open
manuelsampedro1 wants to merge 1 commit into
BitgesellOfficial:masterfrom
manuelsampedro1:codex/bglapi-run-script-path-quoting
Open

fix: quote bglapi docker volume paths#2
manuelsampedro1 wants to merge 1 commit into
BitgesellOfficial:masterfrom
manuelsampedro1:codex/bglapi-run-script-path-quoting

Conversation

@manuelsampedro1

Copy link
Copy Markdown

This hardens the bglapi Docker run templates by preserving host paths as single Docker volume arguments.

The templates compute parentdir from the working tree and then pass it to docker run -v. Without quoting, checkouts under paths with spaces split the host path before Docker sees it.

Changes:

  • quote the computed parentdir volume specs in api/run.sh.template
  • quote the computed parentdir volume specs in app/run.sh.template
  • quote the computed parentdir volume specs in postgres/run.sh.template

Validation:

  • /bin/sh -n api/run.sh.template app/run.sh.template postgres/run.sh.template
  • python3 -m compileall -q api app node test
  • stubbed Docker smoke test from /tmp/bgl api script test/{api,app,postgres} confirmed paths with spaces are passed as single -v arguments

Bounty context: BitgesellOfficial/bitgesell#39

@MyTH-zyxeon

Copy link
Copy Markdown

Maintainer review note for the #81/#39 bounty queue:

I checked head 74b291a: this is a narrow Docker-template portability fix. Quoting the whole host:container volume argument in api/run.sh.template, app/run.sh.template, and postgres/run.sh.template preserves checkouts under paths with spaces while keeping the existing container paths unchanged.

Acceptance checks:

  • Keep the validation focused on shell parsing: /bin/sh -n api/run.sh.template app/run.sh.template postgres/run.sh.template plus one dry-run/stub Docker invocation from a parent path containing spaces.
  • Confirm the quoted -v "$parentdir/...:/..." form is accepted by the deployment shell used by maintainers, not only by the local test shell.
  • Preserve the restored trailing newlines in api/run.sh.template and postgres/run.sh.template so future diffs stay clean.
  • No Python/API behavior should change; this should remain limited to Docker launch templates.

No wallet/key/node/live-chain scope; this is deployment-script hygiene only.

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