1 package dockerpre012
2
3 import (
4 "time"
5
6 metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
7 )
8
9
10
11
12
13
14
15
16
17 type DockerImage struct {
18 metav1.TypeMeta `json:",inline"`
19
20 ID string `json:"id"`
21 Parent string `json:"parent,omitempty"`
22 Comment string `json:"comment,omitempty"`
23 Created metav1.Time `json:"created"`
24 Container string `json:"container,omitempty"`
25 ContainerConfig DockerConfig `json:"container_config,omitempty"`
26 DockerVersion string `json:"docker_version,omitempty"`
27 Author string `json:"author,omitempty"`
28 Config *DockerConfig `json:"config,omitempty"`
29 Architecture string `json:"architecture,omitempty"`
30 Size int64 `json:"size,omitempty"`
31 }
32
33
34 type DockerConfig struct {
35 Hostname string `json:"Hostname,omitempty"`
36 Domainname string `json:"Domainname,omitempty"`
37 User string `json:"User,omitempty"`
38 Memory int64 `json:"Memory,omitempty"`
39 MemorySwap int64 `json:"MemorySwap,omitempty"`
40 CPUShares int64 `json:"CpuShares,omitempty"`
41 CPUSet string `json:"Cpuset,omitempty"`
42 AttachStdin bool `json:"AttachStdin,omitempty"`
43 AttachStdout bool `json:"AttachStdout,omitempty"`
44 AttachStderr bool `json:"AttachStderr,omitempty"`
45 PortSpecs []string `json:"PortSpecs,omitempty"`
46 ExposedPorts map[string]struct{} `json:"ExposedPorts,omitempty"`
47 Tty bool `json:"Tty,omitempty"`
48 OpenStdin bool `json:"OpenStdin,omitempty"`
49 StdinOnce bool `json:"StdinOnce,omitempty"`
50 Env []string `json:"Env,omitempty"`
51 Cmd []string `json:"Cmd,omitempty"`
52 DNS []string `json:"Dns,omitempty"`
53 Image string `json:"Image,omitempty"`
54 Volumes map[string]struct{} `json:"Volumes,omitempty"`
55 VolumesFrom string `json:"VolumesFrom,omitempty"`
56 WorkingDir string `json:"WorkingDir,omitempty"`
57 Entrypoint []string `json:"Entrypoint,omitempty"`
58 NetworkDisabled bool `json:"NetworkDisabled,omitempty"`
59 SecurityOpts []string `json:"SecurityOpts,omitempty"`
60 OnBuild []string `json:"OnBuild,omitempty"`
61
62 Labels map[string]string `json:"Labels,omitempty"`
63 }
64
65
66
67
68 type ImagePre012 struct {
69 ID string `json:"id"`
70 Parent string `json:"parent,omitempty"`
71 Comment string `json:"comment,omitempty"`
72 Created time.Time `json:"created"`
73 Container string `json:"container,omitempty"`
74 ContainerConfig Config `json:"container_config,omitempty"`
75 DockerVersion string `json:"docker_version,omitempty"`
76 Author string `json:"author,omitempty"`
77 Config *Config `json:"config,omitempty"`
78 Architecture string `json:"architecture,omitempty"`
79 Size int64 `json:"size,omitempty"`
80 }
81
82
83
84
85
86 type Config struct {
87 Hostname string `json:"Hostname,omitempty" yaml:"Hostname,omitempty"`
88 Domainname string `json:"Domainname,omitempty" yaml:"Domainname,omitempty"`
89 User string `json:"User,omitempty" yaml:"User,omitempty"`
90 Memory int64 `json:"Memory,omitempty" yaml:"Memory,omitempty"`
91 MemorySwap int64 `json:"MemorySwap,omitempty" yaml:"MemorySwap,omitempty"`
92 MemoryReservation int64 `json:"MemoryReservation,omitempty" yaml:"MemoryReservation,omitempty"`
93 KernelMemory int64 `json:"KernelMemory,omitempty" yaml:"KernelMemory,omitempty"`
94 PidsLimit int64 `json:"PidsLimit,omitempty" yaml:"PidsLimit,omitempty"`
95 CPUShares int64 `json:"CpuShares,omitempty" yaml:"CpuShares,omitempty"`
96 CPUSet string `json:"Cpuset,omitempty" yaml:"Cpuset,omitempty"`
97 AttachStdin bool `json:"AttachStdin,omitempty" yaml:"AttachStdin,omitempty"`
98 AttachStdout bool `json:"AttachStdout,omitempty" yaml:"AttachStdout,omitempty"`
99 AttachStderr bool `json:"AttachStderr,omitempty" yaml:"AttachStderr,omitempty"`
100 PortSpecs []string `json:"PortSpecs,omitempty" yaml:"PortSpecs,omitempty"`
101 ExposedPorts map[Port]struct{} `json:"ExposedPorts,omitempty" yaml:"ExposedPorts,omitempty"`
102 StopSignal string `json:"StopSignal,omitempty" yaml:"StopSignal,omitempty"`
103 Tty bool `json:"Tty,omitempty" yaml:"Tty,omitempty"`
104 OpenStdin bool `json:"OpenStdin,omitempty" yaml:"OpenStdin,omitempty"`
105 StdinOnce bool `json:"StdinOnce,omitempty" yaml:"StdinOnce,omitempty"`
106 Env []string `json:"Env,omitempty" yaml:"Env,omitempty"`
107 Cmd []string `json:"Cmd" yaml:"Cmd"`
108 DNS []string `json:"Dns,omitempty" yaml:"Dns,omitempty"`
109 Image string `json:"Image,omitempty" yaml:"Image,omitempty"`
110 Volumes map[string]struct{} `json:"Volumes,omitempty" yaml:"Volumes,omitempty"`
111 VolumeDriver string `json:"VolumeDriver,omitempty" yaml:"VolumeDriver,omitempty"`
112 VolumesFrom string `json:"VolumesFrom,omitempty" yaml:"VolumesFrom,omitempty"`
113 WorkingDir string `json:"WorkingDir,omitempty" yaml:"WorkingDir,omitempty"`
114 MacAddress string `json:"MacAddress,omitempty" yaml:"MacAddress,omitempty"`
115 Entrypoint []string `json:"Entrypoint" yaml:"Entrypoint"`
116 NetworkDisabled bool `json:"NetworkDisabled,omitempty" yaml:"NetworkDisabled,omitempty"`
117 SecurityOpts []string `json:"SecurityOpts,omitempty" yaml:"SecurityOpts,omitempty"`
118 OnBuild []string `json:"OnBuild,omitempty" yaml:"OnBuild,omitempty"`
119 Mounts []Mount `json:"Mounts,omitempty" yaml:"Mounts,omitempty"`
120 Labels map[string]string `json:"Labels,omitempty" yaml:"Labels,omitempty"`
121 }
122
123
124
125
126
127
128 type Mount struct {
129 Name string
130 Source string
131 Destination string
132 Driver string
133 Mode string
134 RW bool
135 }
136
137
138
139
140 type Port string
141
View as plain text