You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 11, 2020. It is now read-only.
(note that the address and port are faked in this example).
Steps to Reproduce
terraform init
terraform apply
Expected Behavior
The following works:
docker -H ssh://root@myhost.example.com:1234 run -ti alpine echo "Hello"
So Docker is connecting just fine via SSH (no public key issues or anything). Therefore I'd expect the above configuration to work.
Actual Behavior
Error: Error pinging Docker server: error during connect: Get https://root%40myhost.example.com:1234/_ping: dial tcp: lookup root@myhost.example.com: no such host
It's picking up the host name correctly, but the https is suspicious.
Client is Ubuntu 18.04.3 LTS on Windows Subsystem for Linux
This also occurs if I remove the host in the provider definition and instead set DOCKER_HOST before calling terraform apply. Terraform picks up the host name correctly from DOCKER_HOST, but still produces the same error message implying it's not using SSH.
References
None
The text was updated successfully, but these errors were encountered:
badgerwithagun
changed the title
Docker provider 2.4.0 not working with ssh:// protocol
Docker provider fails to connect via SSH or non-TLS TCP on WSL (Windows)
Oct 14, 2019
Like most people using WSL and Docker, I had set docker on WSL to use the Docker For WIndows daemon by default, which uses TLS. I had the following in my ~/.bash_profile (but I guess you might have it in .bashrc or even /etc/profile):
Terraform Version
Terraform v0.12.10
Affected Resource(s)
Provider
Terraform Configuration Files
(note that the address and port are faked in this example).
Steps to Reproduce
terraform init
terraform apply
Expected Behavior
The following works:
So Docker is connecting just fine via SSH (no public key issues or anything). Therefore I'd expect the above configuration to work.
Actual Behavior
It's picking up the host name correctly, but the
https
is suspicious.Debug Output
https://gist.github.com/badgerwithagun/5020bdf6daab139716b2125f927413c1
(Note - search & replaced real hostname, paths etc to match the example - please just take it as assumed that I've checked that stuff!)
Panic Output
None
Important Factoids
host
in the provider definition and instead setDOCKER_HOST
before callingterraform apply
. Terraform picks up the host name correctly fromDOCKER_HOST
, but still produces the same error message implying it's not using SSH.References
None
The text was updated successfully, but these errors were encountered: