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

At minimum document CWD of the executed host process for each platform and better yet align it with extension folder root. #21443

Open
1 task done
sandipchitale opened this issue Nov 16, 2024 · 0 comments
Labels
area/extensions Relates to Docker Extensions status/triage Needs triage

Comments

@sandipchitale
Copy link

Is this a docs issue?

  • My issue is about the documentation content or website

Type of issue

Information is incorrect

Description

I was trying to use a relative path to file that is supposed to get copied into the extension folder. Then I was trying to use a relative path e.g.

const output = await ddClient.extension.host?.cli.exec("kubectl", [ "apply", "-f", "./folder/manifest.yml", ])

This worked on Linux. But on windows I was getting path for found errors for the relative path ./folder/manifest.yml . It turned out that the working directory on windows is not consistent. The location where the files of extension are and what is the CWD of the launched kubectl process are not the same.

The CWD is:

C:\Users\%USER%\AppData\Local\Docker

but the files are in

C:\Users\%USER%\AppData\Roaming\Docker\extensions\my-extension\...

So I had to adjust the relative path.

In general please document what the CWD is and even what ENV is setup when running hols executables for each platform. Or even better, make sure to align the CWD with the root of the extension files folder on all platforms.

Location

https://docs.docker.com/reference/api/extensions-sdk/ExtensionCli/

Suggestion

No response

@sandipchitale sandipchitale added the status/triage Needs triage label Nov 16, 2024
@thaJeztah thaJeztah added the area/extensions Relates to Docker Extensions label Nov 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/extensions Relates to Docker Extensions status/triage Needs triage
Projects
None yet
Development

No branches or pull requests

2 participants