Documentation ¶
Overview ¶
Package host contains a utility to run commands on the Docker host by using an image in privileged mode.
Create an HostHelper with NewHostHelper
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HostHelper ¶
type HostHelper struct {
// contains filtered or unexported fields
}
HostHelper contains methods to help check settings on a Docker host machine using a privileged container
func NewHostHelper ¶
func NewHostHelper(client *docker.Client, image, volumesDir string) *HostHelper
NewHostHelper creates a new HostHelper
func (*HostHelper) CanUseNsenterMounter ¶
func (h *HostHelper) CanUseNsenterMounter() (bool, error)
CanUseNsenterMounter returns true if the Docker host machine can execute findmnt through nsenter
func (*HostHelper) CopyFromHost ¶
func (h *HostHelper) CopyFromHost(sourceDir, destDir string) error
CopyFromHost copies a set of files from the Docker host to the local file system
func (*HostHelper) CopyMasterConfigToHost ¶
func (h *HostHelper) CopyMasterConfigToHost(sourceFile, destDir string) error
CopyMasterConfigToHost copies a local file to the Docker host
func (*HostHelper) EnsureVolumeShare ¶
func (h *HostHelper) EnsureVolumeShare() error
EnsureVolumeShare ensures that the host Docker machine has a shared directory that can be used for OpenShift volumes
func (*HostHelper) Hostname ¶
func (h *HostHelper) Hostname() (string, error)
Hostname retrieves the FQDN of the Docker host machine