-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Add -w or --workdir to compose run to override workdir from commandline #2991
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
Conversation
|
@GordonTheTurtle doesn't seem to be happy because the DinD tag used in the test is missing |
|
Edit: Oops, nevermind, this is different I'm fixing the dind image build now |
b26bc80 to
892b7c5
Compare
|
I noticed there were markdown files documenting the commands as well, so I've updated The test on Janky now fails on the flake8 test, which works fine locally. Not sure why this is happening. |
|
I've got a fix for the max-complexity error in this commit: dnephin@8246c2a I guess I rebased on master, so it doesn't merge cleanly on your branch, but you can cherry-pick this commit if you add my fork as a remote. |
Thanks!
Done, works fine locally, hope Janky is happy this time :) |
compose/cli/main.py
Outdated
| to the host. | ||
| -T Disable pseudo-tty allocation. By default `docker-compose run` | ||
| allocates a TTY. | ||
| -w, --workdir="" Override the workdir |
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 just noticed, this should match what docker run --help says "Working directory inside the container"
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 just noticed, this should match what docker run --help says "Working directory inside the container"
Done, thx for the hint!
|
With the fix to the help text LGTM |
Signed-off-by: Simon van der Veldt <simon.vanderveldt@gmail.com>
Signed-off-by: Daniel Nephin <dnephin@docker.com>
796e8d4 to
379aa98
Compare
|
LGTM |
|
Janky errors seem to be unrelated? |
|
yup, unrelated |
|
Needs a rebase to be merged |
@dnephin When will you need it to be rebased? I'm on holidays till the 25th of march :) |
|
Ok, don't worry about it. I will pick this up and carry the commits for the release. Code freeze is this week. |
|
Carried in #3136 |
|
Awesome, thanks! |
This adds the possibility to override the workdir from the command line, using either
-wor--workdirjust likedocker run.In essence it does the same as #332, though that code couldn't really be rebased so I wrote my own. Do we want to attribute anything of this to @scottynomad?
Also not really sure about the acceptance tests, there seem to be multiple different ways of doing them within
tests/acceptance/cli_test.py. I basically mirrored the-u/--usertests.Relevant for #363
Fixes #2811