pack: pack doesn't honor `DOCKER_HOST` using `ssh`
Summary
pack doesn’t honor DOCKER_HOST that uses ssh.
Reproduction
- Have docker running on a remote host that is accessible via ssh.
- Optionally enable passwordless ssh access by setting an
authorized_keysfile on the remote host. - Run the following:
> set -x DOCKER_HOST 'ssh://ubuntu@192.168.1.130' # chang the IP to the remote host you setup
> docker images # confirm you see images from the remote host
REPOSITORY TAG IMAGE ID CREATED SIZE
ubuntu focal 1318b700e415 3 weeks ago 72.8MB
> pack build maven # fails, trying to connect over HTTP to the remote host, but the remote host uses SSH access
ERROR: failed to build: failed to fetch builder image 'index.docker.io/paketobuildpacks/builder:base': error during connect: Post "http://ubuntu%40192.168.1.130/v1.38/images/create?fromImage=paketobuildpacks%2Fbuilder&tag=base": dial tcp: lookup ubuntu@192.168.1.130: no such host
SSH is a convenient and secure way to access a remote docker host. It would be nice if this worked.
Environment
> pack --version
0.20.0+git-66a4f32.build-2668
> docker version
Client:
Cloud integration: 1.0.17
Version: 20.10.7
API version: 1.41
Go version: go1.16.4
Git commit: f0df350
Built: Wed Jun 2 11:56:22 2021
OS/Arch: darwin/amd64
Context: default
Experimental: true
Server: Docker Engine - Community
Engine:
Version: 20.10.8
API version: 1.41 (minimum version 1.12)
Go version: go1.16.6
Git commit: 75249d8
Built: Fri Jul 30 19:52:33 2021
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.4.9
GitCommit: e25210fe30a0a703442421b0f60afac609f950a3
runc:
Version: 1.0.1
GitCommit: v1.0.1-0-g4144b63
docker-init:
Version: 0.19.0
GitCommit: de40ad0
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 20 (18 by maintainers)
Just wanted to add that this prevents using Podman with pack on the Mac as Podman runs in a VM. With all of the noise around finding alternatives to Docker Desktop for the Mac, it would be REALLY nice to have this work.
Sorry, disregard my failures. Too early, not enough caffeine in my body.
I had used
ssh://ubuntu@localhost:222as my URL in the example but was runningssh://ubuntu@127.0.0.1to add the host key. Once I trusted the key for localhost it worked fine.