Documentation ¶
Index ¶
Constants ¶
View Source
const ( SensorIPCModeDirect = "direct" SensorIPCModeProxy = "proxy" SensorBinPath = "/opt/dockerslim/bin/docker-slim-sensor" ContainerNamePat = "dockerslimk_%v_%v" ArtifactsDir = "artifacts" ReportArtifactTar = "creport.tar" ReportFileName = "creport.json" FileArtifactsTar = "files.tar" FileArtifactsOutTar = "files_out.tar" FileArtifactsArchiveTar = "files_archive.tar" FileArtifactsDirName = "files" FileArtifactsPrefix = "files/" SensorBinLocal = "docker-slim-sensor" ArtifactsMountPat = "%s:/opt/dockerslim/artifacts" ArtifactsVolumePath = "/opt/dockerslim/artifacts" SensorMountPat = "%s:/opt/dockerslim/bin/docker-slim-sensor:ro" VolumeSensorMountPat = "%s:/opt/dockerslim/bin:ro" LabelName = "dockerslim" )
Container inspector constants
Variables ¶
View Source
var ErrStartMonitorTimeout = goerr.New("start monitor timeout")
Functions ¶
This section is empty.
Types ¶
type Inspector ¶
type Inspector struct { ContainerInfo *dockerapi.Container ContainerPortsInfo string ContainerPortList string ContainerID string ContainerName string FatContainerCmd []string LocalVolumePath string DoUseLocalMounts bool SensorVolumeName string DoKeepTmpArtifacts bool StatePath string CmdPort dockerapi.Port EvtPort dockerapi.Port DockerHostIP string ImageInspector *image.Inspector APIClient *dockerapi.Client Overrides *config.ContainerOverrides ExplicitVolumeMounts map[string]config.VolumeMount BaseMounts []dockerapi.HostMount BaseVolumesFrom []string PortBindings map[dockerapi.Port][]dockerapi.PortBinding DoPublishExposedPorts bool HasClassicLinks bool Links []string EtcHostsMaps []string DNSServers []string DNSSearchDomains []string DoShowContainerLogs bool RunTargetAsUser bool KeepPerms bool PathPerms map[string]*fsutil.AccessInfo ExcludePatterns map[string]*fsutil.AccessInfo PreservePaths map[string]*fsutil.AccessInfo IncludePaths map[string]*fsutil.AccessInfo IncludeBins map[string]*fsutil.AccessInfo IncludeExes map[string]*fsutil.AccessInfo DoIncludeShell bool DoIncludeCertAll bool DoIncludeCertBundles bool DoIncludeCertDirs bool DoIncludeCertPKAll bool DoIncludeCertPKDirs bool DoIncludeNew bool SelectedNetworks map[string]NetNameInfo DoDebug bool LogLevel string LogFormat string PrintState bool PrintPrefix string InContainer bool SensorIPCEndpoint string SensorIPCMode string TargetHost string // contains filtered or unexported fields }
Inspector is a container execution inspector
func NewInspector ¶
func NewInspector( xc *app.ExecutionContext, crOpts *config.ContainerRunOptions, logger *log.Entry, client *dockerapi.Client, statePath string, imageInspector *image.Inspector, localVolumePath string, doUseLocalMounts bool, sensorVolumeName string, doKeepTmpArtifacts bool, overrides *config.ContainerOverrides, explicitVolumeMounts map[string]config.VolumeMount, baseMounts []dockerapi.HostMount, baseVolumesFrom []string, portBindings map[dockerapi.Port][]dockerapi.PortBinding, doPublishExposedPorts bool, hasClassicLinks bool, links []string, etcHostsMaps []string, dnsServers []string, dnsSearchDomains []string, runTargetAsUser bool, showContainerLogs bool, keepPerms bool, pathPerms map[string]*fsutil.AccessInfo, excludePatterns map[string]*fsutil.AccessInfo, preservePaths map[string]*fsutil.AccessInfo, includePaths map[string]*fsutil.AccessInfo, includeBins map[string]*fsutil.AccessInfo, includeExes map[string]*fsutil.AccessInfo, doIncludeShell bool, doIncludeCertAll bool, doIncludeCertBundles bool, doIncludeCertDirs bool, doIncludeCertPKAll bool, doIncludeCertPKDirs bool, doIncludeNew bool, selectedNetworks map[string]NetNameInfo, doDebug bool, logLevel string, logFormat string, inContainer bool, sensorIPCEndpoint string, sensorIPCMode string, printState bool, printPrefix string) (*Inspector, error)
NewInspector creates a new container execution inspector
func (*Inspector) FinishMonitoring ¶
func (i *Inspector) FinishMonitoring()
FinishMonitoring ends the target container monitoring activities
func (*Inspector) HasCollectedData ¶
HasCollectedData returns true if any data was produced monitoring the target container
func (*Inspector) ProcessCollectedData ¶
ProcessCollectedData performs post-processing on the collected container data
func (*Inspector) RunContainer ¶
RunContainer starts the container inspector instance execution
func (*Inspector) ShowContainerLogs ¶
func (i *Inspector) ShowContainerLogs()
func (*Inspector) ShutdownContainer ¶
ShutdownContainer terminates the container inspector instance execution
type NetNameInfo ¶
Click to show internal directories.
Click to hide internal directories.