Documentation
¶
Index ¶
- func GetAuthInfo(indexServer string) (string, string, error)
- func In(list []string, el string) bool
- func IndexOf(list []string, el string) int
- func Quote(l []string) []string
- func SplitReposName(reposName string) (string, string)
- type App
- type DockerAuthConfig
- type DockerImageConfig
- type DockerImageData
- type DockerImg_Attr
- type Environment
- type EnvironmentVariable
- type Exec
- type MountPoint
- type ParsedDockerURL
- type Port
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAuthInfo ¶
GetDockercfgAuth reads a ~/.dockercfg file and returns the username and password of the given docker index server.
func SplitReposName ¶
splitReposName breaks a reposName into an index name and remote name
Types ¶
type App ¶
type App struct {
Exec Exec `json:"exec"`
User string `json:"user"`
Group string `json:"group"`
WorkingDirectory string `json:"workingDirectory,omitempty"`
Environment Environment `json:"environment,omitempty"`
MountPoints []MountPoint `json:"mountPoints,omitempty"`
Ports []Port `json:"ports,omitempty"`
}
type DockerAuthConfig ¶
type DockerAuthConfig struct {
Username string `json:"username,omitempty"`
Password string `json:"password,omitempty"`
Auth string `json:"auth"`
Email string `json:"email"`
ServerAddress string `json:"serveraddress,omitempty"`
}
Taken from upstream Docker
type DockerImageConfig ¶
type DockerImageConfig struct {
Hostname string
Domainname string
User string
Memory int64 // Memory limit (in bytes)
MemorySwap int64 // Total memory usage (memory + swap); set `-1' to disable swap
Cpuset string // Cpuset 0-2, 0,1
AttachStdin bool
AttachStdout bool
AttachStderr bool
PortSpecs []string // Deprecated - Can be in the format of 8080/tcp
ExposedPorts map[string]struct{}
Tty bool // Attach standard streams to a tty, including stdin if it is not closed.
OpenStdin bool // Open stdin
StdinOnce bool // If true, close stdin after the 1 attached client disconnects.
Env []string
Cmd []string
Image string // Name of the image as it was passed by the operator (eg. could be symbolic)
Volumes map[string]struct{}
WorkingDir string
Entrypoint []string
NetworkDisabled bool
MacAddress string
OnBuild []string
}
Note: the Config structure should hold only portable information about the container. Here, "portable" means "independent from the host we are running on". Non-portable information *should* appear in HostConfig. Taken and adapted from upstream Docker.
type DockerImageData ¶
type DockerImageData struct {
ID string `json:"id"`
Parent string `json:"parent,omitempty"`
Comment string `json:"comment,omitempty"`
Created time.Time `json:"created"`
Container string `json:"container,omitempty"`
ContainerConfig DockerImageConfig `json:"container_config,omitempty"`
DockerVersion string `json:"docker_version,omitempty"`
Author string `json:"author,omitempty"`
Config *DockerImageConfig `json:"config,omitempty"`
Architecture string `json:"architecture,omitempty"`
OS string `json:"os,omitempty"`
Checksum string `json:"checksum"`
}
DockerImageData stores the JSON structure of a Docker image. Taken and adapted from upstream Docker.
type DockerImg_Attr ¶
type DockerImg_Attr struct {
Type string `json:"type"` // required= "dockerimage"
Layer string `json:"layer"`
Name string `json:"name"`
Tag string `json:"tag"`
Version string `json:"version"`
OS string `json:"os"`
Arch string `json:"arch"`
Author string `json:"author"`
Epoch string `json:"epoch"`
Comment string `json:"comment"`
Parent string `json:"parent"`
Checksum string `json:"checksum"`
App App `json:"app"`
}
func AnalyseDockerManifest ¶
func AnalyseDockerManifest(layerData DockerImageData, dockerURL *ParsedDockerURL) (*DockerImg_Attr, error)
type Environment ¶
type Environment []EnvironmentVariable
func (*Environment) Set ¶
func (e *Environment) Set(name string, value string)
type EnvironmentVariable ¶
type MountPoint ¶
type ParsedDockerURL ¶
func ParseDockerURL ¶
func ParseDockerURL(arg string) *ParsedDockerURL
Click to show internal directories.
Click to hide internal directories.