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

Wrong host for docker API calls when using an ssh DOCKER_HOST #9484

Open
aran opened this issue Jul 31, 2024 · 1 comment · May be fixed by #9521
Open

Wrong host for docker API calls when using an ssh DOCKER_HOST #9484

aran opened this issue Jul 31, 2024 · 1 comment · May be fixed by #9521

Comments

@aran
Copy link
Contributor

aran commented Jul 31, 2024

Expected behavior

When setting a ssh-based DOCKER_HOST, e.g. ssh://[email protected], expect skaffold to work if 'docker' CLI works.

The broader goal is to allow using a remote server, e.g. running on a GCP instance, as the execution context for development, without the performance or ergonomic overhead of a container registry.

Actual behavior

Even though 'docker' CLI tool works, skaffold's set up of the docker API calls use a dummy hostname, which then fails, e.g. http://docker.example.com/v1.44/version

The specific failure on my system looks like:

build [my_image] failed: invalid character '<' looking for beginning of value, which is due to receiving an HTML response for http://docker.example.com from my ISP AT&T's DNS failure interceptor, and then the ServerVersion() API attempts to parse the HTML as JSON.

Without the DNS, the error is instead error during connect: Get "http://docker.example.com/v1.44/version": dial tcp: lookup docker.example.com: no such host

Information

  • Skaffold version: v2.12.0. Also tried with latest from git.
  • Operating system: macOS
  • Installed via: Brew, git
  • Contents of skaffold.yaml: N/A

Steps to reproduce the behavior

  1. Get a ssh-based DOCKER_HOST, e.g. from minikube -p $MINIKUBE_PROFILE docker-env --ssh-host=true on another machine
  2. Ensure ssh is set up, e.g. ssh-add ~/.minikube/machines/$MINIKUBE_PROFILE/id_rsa
  3. Ensure ssh works: ssh -v -l docker -p $MINIKUBE_SSH_PORT -- 127.0.0.1
  4. Double-check that regular docker works, e.g. docker images or docker version
  5. skaffold dev
@wojtyniak
Copy link

I'm observing the same issue on my side.

@aran aran mentioned this issue Aug 28, 2024
aran added a commit to aran/skaffold that referenced this issue Sep 8, 2024
…ng an SSH DOCKER_HOST

Summary: Fixes GoogleContainerTools#9484

Test Plan: Tested skaffold over a ssh connection to minikube.

This was tested with and without GoogleContainerTools#9512 in place.
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

Successfully merging a pull request may close this issue.

2 participants