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

driver/docker: convert host bind path to os native #6000

Conversation

ilyaiqoqo
Copy link
Contributor

relative mounting can be specified using backslashes or forward slashes.
so no prior knowledge of host OS is needed for relative volumes mounting

@@ -237,7 +237,7 @@ func parseVolumeSpecWindows(volBind string) (hostPath string, containerPath stri
return "", "", "", fmt.Errorf("not <src>:<destination> format")
}

hostPath = parts[0]
hostPath = filepath.FromSlash(parts[0])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a comment here explaining why FromSlash is useful here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you help me phrase it, this is what i got
// for nomad to be OS agnostic we allow to supply the host mount path with forward or backward slash
// we then convert the slashes to OS specific slash in the agent side

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@schmichael update the phrasing again

@schmichael schmichael added this to the 0.10.0 milestone Jul 30, 2019
@ilyaiqoqo ilyaiqoqo force-pushed the docker-convert-host-paths-to-host-native branch 4 times, most recently from 7dcbbbc to 86e1ffa Compare August 8, 2019 06:58
ilyaiqoqo and others added 3 commits August 12, 2019 19:31
relative mounting can be specified using backslashes or forward slashes.
so no prior knowledge of host OS is needed for relative volumes mounting
@ilyaiqoqo ilyaiqoqo force-pushed the docker-convert-host-paths-to-host-native branch from 86e1ffa to 0f47a7d Compare August 12, 2019 16:31
@ilyaiqoqo ilyaiqoqo closed this Aug 29, 2019
@ilyaiqoqo ilyaiqoqo deleted the docker-convert-host-paths-to-host-native branch August 29, 2019 08:51
@ilyaiqoqo ilyaiqoqo restored the docker-convert-host-paths-to-host-native branch August 29, 2019 08:52
@ilyaiqoqo ilyaiqoqo reopened this Aug 29, 2019
@schmichael schmichael merged commit f02c163 into hashicorp:master Sep 3, 2019
@github-actions
Copy link

github-actions bot commented Feb 1, 2023

I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants