docker-modem
docker-modem copied to clipboard
Support reading from .ssh/config
With the support for ssh://
for the Docker host in, it would be great if .ssh/config
would be supported like the Docker CLI does too. There is the ssh2-config
NPM package helping with that.
Was this resolved?
Not that I know.
I would love to see this fixed too. Here are more detailed repro steps--hope this helps
- Configure an SSH host with a non-DNS-resolvable name (Host field in./ssh/config, e.g.
mydevbox
) that maps to real machine name or IP address (HostName field, e.g. mydevbox.real.dns.name). See http://man7.org/linux/man-pages/man5/ssh_config.5.html for details. The following steps assume Docker is installed onmydevbox
machine. - Set up SSH public key authentication to
mydevbox
(see https://www.ssh.com/ssh/agent for details) - Verify SSH connection to
mydevbox
works (ssh mydevbox
should suffice) - Set DOCKER_HOST to ssh://mydevbox. Verify Docker CLI works and shows Docker assets on
mydevbox
(docker ps
,docker images
etc). - Try to open a connection to Docker using docker-modem
Expected: it should work, just like the Docker CLI Actual: it does not work. This is because docker-modem implementation requires the host to be fully resolvable through DNS. Even placing an entry in /etc/hosts does not help
Using non-DNS-resolvable name comes handy in several situations, for example:
- The machine running Docker is an ephemeral machine with no public DNS entry
- The host nickname is used as a way to indicate what user identity to use when connecting to the host
@karolz-ms I had same issues, too. Therefore, I'm going to create a PR fixing this, however it's just going to happen in at least two more weeks.
@phuctm97 that would be awesome, let me know if I can be of help!