Proposal: Add docker-machine exec
#1074
Comments
Sounds like this is already what
Can you elaborate on how that would be different? |
I don't want it to run on the docker host, I want it to run locally, but with docker setup to talk to the remote one. Basically a simpler version of
I'm not so fond of changing my environment in my outermost shell, I keep forgetting I've done it, and then suddenly docker behaves differently and I'm confused. |
It's a little verbose, but if I want to run one-off docker commands on machines I usually use $ docker $(docker-machine config name) info You could also write a little shell alias like so if it's too much to type: dkrm () {
docker $(docker-machine config $1) "${@:2}"
} It will point the Docker client at the machine specified by first argument, and pass through the rest to the Docker client. Usage like:
Does that help? |
I wasn't aware of that command, so thanks for that. It does help, but it's not as transparent as an exec command. E.g. difficult to use with docker-compose, fig, or any kind of wrapper script. I have one that builds the Dockerfile out of several files in the current dir and feeds it via I could do something like |
Heh, yeah, if you want to use |
Hotfix: Parallels kernel modules are unavailable in v1.8.3
These would set the environment variables and then execute the command. E.g.
The text was updated successfully, but these errors were encountered: