Compose: Running commands on services with Windows.

Created on 6 Feb 2016  路  6Comments  路  Source: docker/compose

Since interactive mode is not yet supported on Windows, is there any easy workaround for running commands on services the way you would with Linux?

For example:
docker-compose run web php -v

Thanks!

grouwindows-client kinquestion

Most helpful comment

I tried find any solution for this issue but unfortunately did not get results then i build one script. Check https://gist.github.com/rodrigobaron/64ea67f374b36db70542e6e3636c98b1

All 6 comments

I just run something like this and use bash from within the container:

docker exec -it MY_CONTAINER bash

I need this feature too.
All windows users are wating =)

Yeah, would definitely like to see this working.

Would it be easy to enable this functionality if the person is running bash via msys2/msys on Windows?

I tried find any solution for this issue but unfortunately did not get results then i build one script. Check https://gist.github.com/rodrigobaron/64ea67f374b36db70542e6e3636c98b1

What are the drawbacks of this script, versus the _real_ docker-compose run ?

I have a different approach when doing "interactive" commands on Windows:

https://github.com/atrauzzi/laravel-drydock/blob/master/run.ps1

It doesn't make them interactive. It just ensures that everything runs nice and cleanly.

Was this page helpful?
0 / 5 - 0 ratings