Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect or handle relative host paths in volumes #218

Closed
JonathonReinhart opened this issue Sep 9, 2023 · 0 comments · Fixed by #227
Closed

Detect or handle relative host paths in volumes #218

JonathonReinhart opened this issue Sep 9, 2023 · 0 comments · Fixed by #227

Comments

@JonathonReinhart
Copy link
Owner

Currently a naked word will be interpreted as a named volume.

A relative path will cause docker to complain about the slash.

How should Scuba handle this?

  1. Handle this by absolute-ifying the path.

    • Should be interpreted as relative to .scuba.yml
    • Is this necessary? Paths relative (below) .scuba.yml are already accessible via pwd.
  2. Detect and complain (abort).

cc @rpasek

JonathonReinhart added a commit that referenced this issue Sep 13, 2023
This avoids ambiguious or erroneous behavior when hostdir is relative
and passed to docker:
- If it doesn't contain a slash, it is interpreted as a named volume,
  which is not what the user intended, since it is called "hostpath".
- If it does contain a slash, docker aborts and suggests passing an
  absolute path.

See #218.
JonathonReinhart added a commit that referenced this issue Sep 13, 2023
When a relative path is used in a volume hostpath field, it is now
considered relative to scuba_root, the directory in which .scuba.yml is
found.

Fixes #218
JonathonReinhart added a commit that referenced this issue Sep 15, 2023
When a relative path is used in a volume hostpath field, it is now
considered relative to scuba_root, the directory in which .scuba.yml is
found.

Fixes #218
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant