types

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: May 25, 2016 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package types defines Docker image, URL and configuration types.

Note: this package is an implementation detail and shouldn't be used outside of docker2aci.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DockerAuthConfig

type DockerAuthConfig struct {
	Username      string `json:"username,omitempty"`
	Password      string `json:"password,omitempty"`
	Auth          string `json:"auth,omitempty"`
	ServerAddress string `json:"serveraddress,omitempty"`
	RegistryToken string `json:"registrytoken,omitempty"`
}

DockerAuthConfig represents a config.json auth entry. Taken from upstream Docker.

type DockerAuthConfigOld

type DockerAuthConfigOld struct {
	Username      string `json:"username,omitempty"`
	Password      string `json:"password,omitempty"`
	Auth          string `json:"auth"`
	Email         string `json:"email"`
	ServerAddress string `json:"serveraddress,omitempty"`
}

DockerAuthConfigOld represents the deprecated ~/.dockercfg auth configuration. Taken from upstream Docker.

type DockerConfigFile

type DockerConfigFile struct {
	AuthConfigs map[string]DockerAuthConfig `json:"auths"`
}

DockerConfigFile represents a config.json auth file. 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
	CpuShares       int64  // CPU shares (relative weight vs. other containers)
	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 ParsedDockerURL

type ParsedDockerURL struct {
	IndexURL  string
	ImageName string
	Tag       string
	Digest    string
}

ParsedDockerURL represents a parsed Docker URL.

Jump to

Keyboard shortcuts

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