...
1 package oci
2
3 import (
4 "github.com/Microsoft/hcsshim/pkg/annotations"
5 "github.com/opencontainers/runtime-spec/specs-go"
6 )
7
8
9 func IsLCOW(s *specs.Spec) bool {
10 return s.Linux != nil
11 }
12
13
14 func IsWCOW(s *specs.Spec) bool {
15 return s.Linux == nil && s.Windows != nil
16 }
17
18
19 func IsIsolated(s *specs.Spec) bool {
20 return IsLCOW(s) || (s.Windows != nil && s.Windows.HyperV != nil)
21 }
22
23
24 func IsJobContainer(s *specs.Spec) bool {
25 return s.Annotations[annotations.HostProcessContainer] == "true"
26 }
27
View as plain text