Documentation
¶
Index ¶
Constants ¶
View Source
const ( DefaultDockerSocketLocation = "unix:///var/run/docker.sock" // PullAlways means that image-inspector always attempts to pull the latest image. Inspection will fail If the pull fails. PullAlways string = "always" // PullNever means that image-inspector never pulls an image, but only uses a local image. Inspection will fail if the image isn't present PullNever string = "never" // PullIfNotPresent means that image-inspector pulls if the image isn't present on disk. Inspection will fail if the image isn't present and the pull fails. PullIfNotPresent string = "when-missing" DOCKER_TAR_PREFIX = "rootfs/" OWNER_PERM_RW = 0600 PULL_LOG_INTERVAL_SEC = 10 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ImageMounter ¶
type ImageMounter interface { //Mount the image with with identifier ID at path Mount() (string, *MounterMetadata, error) }
func NewDefaultImageMounter ¶
func NewDefaultImageMounter(opts ImageMounterOptions) ImageMounter
NewDefaultImageInspector provides a new default inspector.
type ImageMounterOptions ¶
type ImageMounterOptions struct { // URI contains the location of the docker daemon socket to connect to. URI string // Image contains the docker image to inspect. Image string // DstPath is the destination path for image files. DstPath string // DockerCfg is the location of the docker config file. DockerCfg MultiStringVar // Username is the username for authenticating to the docker registry. Username string // PasswordFile is the location of the file containing the password for authentication to the // docker registry. PasswordFile string // PullPolicy controls whether we try to pull the inspected image PullPolicy string }
ImageMounterOptions is the main inspector implementation and holds the configuration for an image inspector.
func NewDefaultImageMounterOptions ¶
func NewDefaultImageMounterOptions() *ImageMounterOptions
NewDefaultImageInspectorOptions provides a new ImageInspectorOptions with default values.
type MounterMetadata ¶
MounterMetadata is the metadata type with information about image-inspector's operation
func NewMounterMetadata ¶
func NewMounterMetadata(imageMetadata *docker.Image) MounterMetadata
NewInspectorMetadata returns a new InspectorMetadata out of *docker.Image The OpenSCAP status will be NotRequested
type MultiStringVar ¶
type MultiStringVar struct {
Values []string
}
MultiStringVar is implementing flag.Value
func (*MultiStringVar) Set ¶
func (sv *MultiStringVar) Set(s string) error
func (*MultiStringVar) String ¶
func (sv *MultiStringVar) String() string
Click to show internal directories.
Click to hide internal directories.