func SpecFrom(image schema.ImageManifest, msgs []string) (specs.Spec, []string) { var s specs.Spec // pre-draft now s.Version = specs.Version s.Platform, msgs = PlatformFrom(image, msgs) s.Process, msgs = ProcessFrom(image, msgs) s.Root, msgs = RootFrom(image, msgs) s.Hostname = "missing" msgs = append(msgs, "hostname is not exist in aci-0.6.1") s.Mounts, msgs = MountPointsFrom(image, msgs) return s, msgs }
func genConfig() (ls specs.LinuxSpec) { var s specs.Spec var plat specs.Platform var user specs.User var pro specs.Process var root specs.Root s.Version = sv.Version plat.OS = "linux" plat.Arch = "x86" s.Platform = plat user.UID = 0 user.GID = 0 pro.Terminal = false pro.User = user pro.Args = []string{ "/usr/bin/ls", "-al", } // pro.Env = [] pro.Cwd = "/tmp" s.Process = pro root.Path = "rootfs" root.Readonly = false s.Root = root s.Hostname = "demohost" s.Mounts = []specs.MountPoint{ {"sys", "/sys"}, {"proc", "/proc"}, {"dev", "/dev"}, {"devpts", "/dev/pts"}, {"devshm", "/dev/shm"}, } ls.Spec = s var l specs.Linux l.Capabilities = []string{ "CAP_AUDIT_WRITE", "CAP_KILL", "CAP_NET_BIND_SERVICE", } ls.Linux = l return ls }