docker

package
v0.0.0-...-6c13684 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 5, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckIntersection

func CheckIntersection(userItems []string, securityItems []string, itemType string) bool

CheckIntersection compares the items between 2 slices and check if there is a match

func CheckPermissions

func CheckPermissions(data ContainerOpts) bool

CheckPermissions checks if container creation instructions pass all restrictions

func ExecuteCommand

func ExecuteCommand(command string, args []string) string

ExecuteCommand executes a command locally (used by the CLI version of the program)

func ProcessAPICreateRequest

func ProcessAPICreateRequest(data ContainerOpts) bool

ProcessAPICreateRequest checks if the data pass all the restrictions

Types

type ContainerOpts

type ContainerOpts struct {
	Mounts           []string
	Ports            []string
	Env              []string
	SecurityPolicies []string
	Image            string
	Entrypoint       string
	User             string
	Privileged       bool
}

func AddGeneralRestrictions

func AddGeneralRestrictions(data ContainerOpts) ContainerOpts

AddGeneralRestrictions adds the restrictions from config to the already container creation instructions

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL