Add -w or --workdir to compose run to override workdir from commandline
Signed-off-by: Simon van der Veldt <simon.vanderveldt@gmail.com>
This commit is contained in:
parent
94b1862579
commit
658803edf8
5 changed files with 30 additions and 0 deletions
|
|
@ -527,6 +527,7 @@ class TopLevelCommand(object):
|
|||
to the host.
|
||||
-T Disable pseudo-tty allocation. By default `docker-compose run`
|
||||
allocates a TTY.
|
||||
-w, --workdir="" Working directory inside the container
|
||||
"""
|
||||
service = self.project.get_service(options['SERVICE'])
|
||||
detach = options['-d']
|
||||
|
|
@ -576,6 +577,9 @@ class TopLevelCommand(object):
|
|||
if options['--name']:
|
||||
container_options['name'] = options['--name']
|
||||
|
||||
if options['--workdir']:
|
||||
container_options['working_dir'] = options['--workdir']
|
||||
|
||||
run_one_off_container(container_options, self.project, service, options)
|
||||
|
||||
def scale(self, options):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue