Closed jordanpwalsh closed 3 weeks ago
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:
"container": {
"name": "string",
"args": ["string", "string"]
}
What I did:
{
"container": "string"
"docker_args": ["string", "string"]
}
@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.
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.
@mergifyio rebase
rebase
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: