-
-
Notifications
You must be signed in to change notification settings - Fork 97
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
Support for docker-compose -H, --host HOST? #160
Comments
Hi @mario-vuckovic and thanks for the blog article link! :) I haven't read it yet (just glared) but on top of my head: All commands, docker and docker-compoe are using the For example, when doing compose-up it renders the So, if I understand your suggestion, you want in addition to commands or set the For example: using (
var container =
Fd.UseHost()
.UseSsh("ssh://user@remotehost")
.UseCompose()
.Build()
.Start())
{
// Access the remote container here
} or using docker-context: using (
var container =
Fd.UseHost()
.WithContext("remote-daemon")
.UseCompose()
.Build()
.Start())
{
// Access the remote container here
} The above samples are from the RemoteHostBuilder but have an additional method for Context instead of name (of which referes to a docker-machine name). In addition if a protocol schema is specified it uses the -H switch on the command itself instead of using docker-machine references. OK? Cheers, |
In addition @Mario-Hofstaetter is using both setting DOCKER_HOST env (Issue #113) or manually using DockerHostService (Issue #105) to achieve the same thing. Cheers, |
Hi again @mariotoffia! Yes, this would be exactly what I'm after:
My use case consists of service which can connect to multiple remote docker hosts via ssh at the same time (which makes it impossible for me to use DOCKER_HOST env). Currently I'm calling docker-compose directly like this: Thanks :) |
Thanks @mario-vuckovic! I'll add it to my list to do and try to do the coming week (a bit busy this week). |
Hi @mariotoffia and thanks for writing this super capable library :)
Some time ago Docker added ssh protocol support to
DOCKER_HOST
and-H, --host HOST
to docker and docker-compose.That means docker-compose can connect directly to the remote machine without depending on docker-machine (provided valid ssh key). Switching between remote targets (on the fly) should also be possible.
Best reference I could find mentioning ssh support is their blog article
I've looked at the code but wasn't able to find where to specify --host parameter when calling docker-compose.
Kind regards.
The text was updated successfully, but these errors were encountered: