Uh oh!
There was an error while loading. Please reload this page.
implement exec - #2023
Conversation
9242ff2 to
ac270d7CompareTomasTomecek
commented
Sep 28, 2015
There was a problem hiding this comment.
Instead of the filter use stopped=False (which is the default).
dnephin
commented
Sep 28, 2015
I think there is still an issue with
So I'm not exactly sure how |
TomasTomecek
commented
Sep 29, 2015
The reason I started working on this is
I agree that |
TomasTomecek
commented
Oct 21, 2015
@dnephin any update? |
TomasTomecek
commented
Nov 5, 2015
@aanand@bfirsh@dnephin once again, any update? Just FYI, k8s support |
aanand
commented
Nov 5, 2015
I agree that the UX for doing an There was another PR/proposal for an This particular implementation looks like a good start, but I think it absolutely needs to support interactivity (via Thoughts? |
dnephin
commented
Nov 5, 2015
The equivalent of that k8s exec command is the standard |
TomasTomecek
commented
Nov 6, 2015
Absolutely. I was just waiting for you guys to get some feedback that this is the feature you would be interested in. I'm planning to propose a patch to
Looks like that container argument is optional, snippet from docs: |
ac270d7 to
6f2c9d7CompareTomasTomecek
commented
Dec 26, 2015
rebased and rewritten (added interactive support with updated dockerpty) |
thaJeztah
commented
Dec 26, 2015
Looks like a test is failing, not sure if it's related |
TomasTomecek
commented
Dec 26, 2015
@thaJeztah tests are untouched, am waiting for design review first |
TomasTomecek
commented
Feb 5, 2016
| -d Detached mode: Run command in the background. | ||
| --privileged Give extended privileges to the process. | ||
| --user USER Run the command as this user. | ||
| -T Disable pseudo-tty allocation. By default `docker-compose run` |
6f2c9d7 to
033404fCompareTomasTomecek
commented
Feb 9, 2016
rebased, updated |
TomasTomecek
commented
Feb 9, 2016
those test failures seem unrelated to this PR |
TomasTomecek
commented
Feb 22, 2016
I'm really bad at copy-pasting. I'm sorry about that. Should be fixed now. To be honest, I'm unsure how that signal handing should suppose to work. When I ran compose like this docker-compose exec asd shand then hit |
7ad93ad to
10ae099CompareTomasTomecek
commented
Feb 22, 2016
rebased b/c of the ^ unrelated test failure |
dnephin
commented
Feb 26, 2016
LGTM |
Resolvesdocker#593 Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>
10ae099 to
d28c5ddCompareTomasTomecek
commented
Feb 29, 2016
rebased |
aanand
commented
Feb 29, 2016
TomasTomecek
commented
Mar 1, 2016
\o/ This was a ride! |
willejs
commented
Mar 2, 2016
👌 |
darkn3rd
commented
Apr 14, 2016
Will this also have |
TomasTomecek
commented
Apr 14, 2016
@darkn3rd no, it's a cli command; feel free to open an issue with the feature request |
thaJeztah
commented
Apr 14, 2016
@darkn3rd perhaps having an entrypoint script would be a solution for that? I think the "exec" would be executed after the image's main |
TomasTomecek
commented
Apr 14, 2016
@thaJeztah to be honest I totally understand @darkn3rd's proposal: I've run into a similar issue: I have a web app with database started by compose. As soon as it's up, I want to populate database with some initial data and am not very keen on doing: Would be awesome if compose had support for hooks. |
thaJeztah
commented
Apr 14, 2016
@TomasTomecek well, the regular approach is to have the entrypoint script take care of that, for example, see the Initializing a fresh instance section for the MySQL image (and the script itself) Overall, |
dnephin
commented
Apr 14, 2016
It would be even better to do it as part of |
thaJeztah
commented
Apr 14, 2016
@dnephin yeah, problem is that the official images declare a |
TomasTomecek
commented
Apr 15, 2016
@thaJeztah to me, custom entrypoint scripts are pure hack: initializing a service and running a service are two completely different operations which shouldn't be mixed in a single script -- when there is something wrong with such script, you need to debug it in order to have the service running in some form; on top of that, it's not clear what such script does (since usually it's several hundreds of LoC of cryptic shell code). I like the idea with utility container, since it's clearly separates spinning database from its initialization. @dnephin my issue with baking data inside database during build is that you need to run the database during build -- usually that's not a trivial thing. Not even saying that you have an image which can be only used within only one application in a single type of environment (dev/stage/prod). |
mccrodp
commented
Apr 24, 2016
Hey all, great work getting this merged, hope I'm not hijacking...was looking to use this exact functionality using I see it in the docs now here: https://docs.docker.com/compose/reference/exec/ However, I get an error after running and don't see exec in the command list on the cli.
I did an upgrade using |
thaJeztah
commented
Apr 24, 2016
@mccrodp did you download the latest version of docker toolbox, or performed |
mccrodp
commented
Apr 24, 2016
@thaJeztah ooops, you were dead right! I had only ran the upgrade from the command line rather than the whole toolbox app (I was still on 1.6.2). Thanks for your help. All working now with |

Resolves#593
Still wip
docker exec -tiequiv)