Skip to content
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

Unable to connect to remote docker host when using SSH #519

Open
fasterinnerlooper opened this issue Mar 26, 2024 · 2 comments
Open

Unable to connect to remote docker host when using SSH #519

fasterinnerlooper opened this issue Mar 26, 2024 · 2 comments
Assignees

Comments

@fasterinnerlooper
Copy link

I am connecting from a VM running in Parallels to the host Mac OS's Docker instance. I have successfully been able to run a docker pull hello-world but I am unable to use the sqlcmd create mssql command. Here is the output from the Windows side:

1 pwsh> sqlcmd create mssql --accept-eula
Downloading mcr.microsoft.com/mssql/server:latest

HINT:
  1. Is a container runtime installed on this machine (e.g. Podman or Docker)?
        If not, download desktop engine from:
                https://podman-desktop.io/
                or
                https://docs.docker.com/get-docker/
  2. Is a container runtime running?  (Try `podman ps` or `docker ps` (list containers), does it return without error?)
  3. If `podman ps` or `docker ps` works, try downloading the image with:
        `podman|docker pull mcr.microsoft.com/mssql/server:latest`

Error: Unable to download image mcr.microsoft.com/mssql/server:latest: error during connect: Post "http://shafiq.jetha%4010.211.55.2/v1.43/images/create?fromImage=mcr.microsoft.com%2Fmssql%2Fserver&tag=latest": dial tcp: lookup [email protected]: getaddrinfow: A non-recoverable error occurred during a database lookup.
@stuartpa
Copy link
Collaborator

Are you able to run:

docker pull mcr.microsoft.com/mssql/server:latest

(this is the basically the same command sqlcmd create is running at this time (you can also run sqlcmd with a --verbosity 4 flag to get the call stack at the failure, so we can see exactly this API call is failing)

@stuartpa stuartpa self-assigned this Apr 16, 2024
@fasterinnerlooper
Copy link
Author

fasterinnerlooper commented May 2, 2024

Hi.
I ran this and the original command and it looks like the command inside sqlcmd might not be taking the $env:DOCKER_HOST env var into consideration.

Here is the output:

0 pwsh> docker pull mcr.microsoft.com/mssql/server:latest
latest: Pulling from mssql/server
Digest: sha256:7f33bc7998644f7b106221ced5e75451830cd5d9c669e5888470ad72f8f8559b
Status: Downloaded newer image for mcr.microsoft.com/mssql/server:latest
mcr.microsoft.com/mssql/server:latest

What's Next?
  View a summary of image vulnerabilities and recommendations → docker scout quickview mcr.microsoft.com/mssql/server:latest
0 pwsh> sqlcmd create mssql --accept-eula
Downloading mcr.microsoft.com/mssql/server:latest

HINT:
  1. Is a container runtime installed on this machine (e.g. Podman or Docker)?
        If not, download desktop engine from:
                https://podman-desktop.io/
                or
                https://docs.docker.com/get-docker/
  2. Is a container runtime running?  (Try `podman ps` or `docker ps` (list containers), does it return without error?)
  3. If `podman ps` or `docker ps` works, try downloading the image with:
        `podman|docker pull mcr.microsoft.com/mssql/server:latest`

Error: Unable to download image mcr.microsoft.com/mssql/server:latest: error during connect: Post "http://shafiq.jetha%4010.0.0.196/v1.43/images/create?fromImage=mcr.microsoft.com%2Fmssql%2Fserver&tag=latest": dial tcp: lookup [email protected]: getaddrinfow: A non-recoverable error occurred during a database lookup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants