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

Fix absolute paths in secrets and inherited volumes #306

Merged
merged 2 commits into from Dec 1, 2022

Conversation

oldium
Copy link
Contributor

@oldium oldium commented Sep 8, 2022

Volumes detect and handle unix-like absolute paths also on Windows. Secrets are translated to bind mounts, so handle them the same way. While at it, fix also inherited absolute path volumes from extended services.

Fixes #304

Secret files are converted to bind mounts, so handle them in the same way
as volumes - detect and handle unix-like absolute paths.

Signed-off-by: Oldřich Jedlička <oldium.pro@gmail.com>
Volumes keep unix-like absolute paths untouched, which was not the case for
inherited volumes from extended services. Fix this by using the same
method, which is used by standard volume path resolution.

Signed-off-by: Oldřich Jedlička <oldium.pro@gmail.com>
@oldium oldium requested a review from ndeloof as a code owner September 8, 2022 06:14
@oldium
Copy link
Contributor Author

oldium commented Sep 8, 2022

Tested also in github.com/docker/compose with changed go.mod to replace github.com/compose-spec/compose-go with github.com/oldium/compose-go (latest fix-abs-paths branch commit) and issue #304 is really fixed for me.

Copy link
Member

@milas milas left a comment

Choose a reason for hiding this comment

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

LGTM

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.

Unix-like absolute file secrets are transformed as relative on Windows
2 participants