-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
Docker Compose doesn't work when SSH connection used to remote Docker Engine #6336
Comments
Support for the SSH protocol will be added in the next version of Compose. docker/docker-py#2159 |
Cool Thanks for the info. :) |
Tested this with docker-compose version 1.24.0-rc1 but it doesn't look like it is reading my |
settings sshd config to MaxSessions 30 helped as workaround |
Any update on this? |
Apparently switching to edge version on mac (which uses 1.24) makes it work but is really inconvenient as edge comes with its own set of issues. |
Confirm that using
But with docker command |
Any news on this? I'm running this: docker-compose -H ssh://user@host down and I get the following: Traceback (most recent call last): |
Can confirm I am having the same issue as @raesene |
I believe that most of the SSH related problems stem from the fact that There's an issue in |
Any update? |
Why is this issue closed? I am still unable to set a docker-compose context to a docker engine running on a remote server over ssh. |
I'm seeing this error when running docker-compose with -H option |
Same problems here |
In the meantime, this workaround works for me:
|
Why this issue is close i don't think is fix. |
Yep. Looks like |
This workaround helps #6513 (comment) |
Seeing this problem as wel with a super simple deploy over SSH. |
Same issue. Traceback (most recent call last): Update: eventually, I solved this one using this tip: #6655 (comment) |
Interestingly things work fine with |
I'm having the same issue, cannot deploy over ssh |
same problem here.
|
still an issue: |
I dug into this a bit today. Compose via SSH only works if you:
Compose does not support the |
@carlosonunez — sounds great, personally I'm much interested in a fix. |
@carlosonunez thanks a lot ! Unfortunately that's a pain when using multiple SSH remote hosts. |
Any update ? Docker-compose works through docker context and ssh-agent but not with ssh_config |
Maybe this can help |
docker-compose v1.28.2 fix ssh remote context for me docker-compose version
docker-compose version 1.28.2, build unknown
docker-py version: 4.4.1
CPython version: 3.6.9
OpenSSL version: OpenSSL 1.1.1 11 Sep 2018
docker context ls
int-swarmanager * ssh://toto@int_swarmanager1
cat /etc/ssh/ssh_config
Host int_swarmanager1
Hostname ****
IdentityFile /etc/ssh/toto_rsa
IdentitiesOnly yes
StrictHostKeyChecking no Before version 1.28.2, I had to create docker context with ip no hostname and use ssh-agent to store the ssh key for the connection. Now docker-compose support IdentityFile in ssh_config :) Just a little bit long with the remote ssh when executing docker-compose, like 5 seconds, can see that it's doing when activated verbose. |
You saved me! This solves the problem. Thank you very much! The problem only occurs in version 1.28.3 of the docker-compose, released on February 17, 2021. This explains why the problem came up suddenly. The following installation is the solution:
Or if you have not previously installed rust:
I noticed that using rust takes longer. Thank you again! |
I noticed this issue using docker-compose v I downgraded to |
I spent two days on this but... I got it working on GitLab CI
Run the ssh-agent, add the SSH private key from a file to the agent with the
|
I was using the snap version of docker, where the docker compose version is
this config is not working with what I did to solve this issue was
this installs the latest pip version of docker-compose, I think docker-compose is just bunch of py scripts... however it doesn't populate into your path since there is a snap version. In order to mitigate that you can just execute it from its path as follows:
I think snapcraft team will fix this soon, I saw the pull request |
I have the same issue using Java and Groovy, I can't execute docker-compose commands. However, I can in Go using golang.org/x/crypto/ssh without problem and without changing my ssh configuration. |
This works for me:
|
Description of the issue
Just trying out the new SSH connection introduced in Docker 18.09 and I noticed an error when attempting to do
docker-compose up
whilst targeting a remote Docker Engine instance.Errors message below appears to indicate that Compose isn't aware of the SSH protocol for this purpose
Context information (for bug reports)
Output of
docker-compose version
Output of
docker version
Output of
docker-compose config
(Make sure to add the relevant
-f
and other flags)Steps to reproduce the issue
docker-compose up
in a directory with a docker-compose.yml file.Observed result
Error occurs
Expected result
Docker compose contacts the remote docker engine instance to create the containers.
Stacktrace / full error message
Additional information
Client is WSL (Ubuntu 18.04) Server is Ubuntu 18.04 running Docker 18.09.
The text was updated successfully, but these errors were encountered: