Skip to main content

Module host

Module host 

Source
Expand description

Host management module

Provides functionality for managing remote Docker hosts:

  • Host configuration schema and storage
  • SSH tunnel management for remote Docker access
  • Connection testing and validation
  • SSH config file parsing and writing
  • Remote Docker provisioning

Structs§

DistroInfo
Detected distribution information
HostConfig
Configuration for a remote host
HostsFile
Root structure for hosts.json file
SshConfigMatch
Settings found in user’s SSH config for a host
SshTunnel
SSH tunnel to a remote Docker daemon

Enums§

DistroFamily
Linux distribution family
HostError
Errors that can occur during host operations

Functions§

detect_distro
Detect the Linux distribution on a remote host
get_docker_install_commands
Install Docker on a remote host
get_ssh_config_path
Get the path to the user’s SSH config file
host_exists_in_ssh_config
Check if a host alias already exists in SSH config
install_docker
Execute Docker installation on remote host
load_hosts
Load hosts configuration from hosts.json
query_ssh_config
Parse user’s SSH config and query for a hostname
save_hosts
Save hosts configuration to hosts.json
test_connection
Test SSH connection to a host
verify_docker_installed
Verify Docker is working after installation
write_ssh_config_entry
Write a new host entry to the user’s SSH config file