-
Notifications
You must be signed in to change notification settings - Fork 174
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
Docker workdir support #819
Docker workdir support #819
Conversation
This reverts commit 4377cf1.
Closing due to accidental code reformatting. |
Re-opened with the file not completely reformatted. |
Thanks for sending a PR but I fear this might be a slippery slope to implementing the entire compose file specification, or at least every argument to docker exec. I would prefer either:
|
If you prefer, I can implement your option 2 instead; I personally prefer that over a custom command. I would like to push back a little though. I can see your point about not wanting to implement a bunch of the compose spec, but I’d argue this isn’t quite that. The docker exec options are quite small — user id, env vars, and working directory — and I could easily see the other two being something to include as well. Working directory is just the one I happened to need at the time. All that said. Your option of docker_args would suit me just fine too. I’m happy to help. |
That's sort of my point. It's a bit whack-a-mole. I'd rather have option 2 which is just a list of additional args passed to docker exec. Then I never have to change it again if/when docker or podman inevitably change or add something. |
Sounds good. I’ll update the PR.
|
I updated the branch per your feedback. I thought a format like below would be more intuitive, but opted to use docker_args from your original suggestion so existing configs aren't broken. What I wanted:
What I did:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think what you wanted was fine, and probably better. We could have doe that with a "if it's an object, then ... else ..." but this is also ok.
Reviewable status: 0 of 2 files reviewed, all discussions resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 2 of 2 files at r3, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @jordanpwalsh)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @jordanpwalsh)
@puremourning I fixed the couple linter complaints. Anything needing to be done about the failing test? Looks like the mac os test failing has been an ongoing thing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 2 files at r3, 1 of 1 files at r5, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @jordanpwalsh)
I've kicked the CI. Fingers crossed 🤞 |
Looks like a lint issue |
@puremourning I don't have your flake8 config and no errors on my end, but I think I found what it was complaining about and fixed it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r6, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @jordanpwalsh)
@Mergifyio rebase |
❌ Base branch update has failedGit reported the following error:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r7, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @jordanpwalsh)
Thanks for sending a PR! |
This adds an additional optional parameter to the "remote" configuration allowing the working directory to be set during invocation of docker exec. I was originally working around needing to execute the runCommand in an appropriate working directory by running a shell script but thought an option in the config would be beneficial to prevent needing to add those scripts to the source repository.
Testing output:
Relevant config:
Output: