func ProcessFrom(image schema.ImageManifest, msgs []string) (specs.Process, []string) { var p specs.Process p.Terminal = false msgs = append(msgs, "terminal is not exist in aci-0.6.1") p.User, msgs = UserFrom(image, msgs) p.Args, msgs = ArgsFrom(image, msgs) p.Env, msgs = EnvFrom(image, msgs) p.Cwd = image.App.WorkingDirectory return p, 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 }