Don't require rootfs if not set on container

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby
2017-05-25 11:17:36 -07:00
parent a2b0824720
commit d0b22290ec
8 changed files with 35 additions and 29 deletions

12
spec.go
View File

@@ -4,17 +4,7 @@ import specs "github.com/opencontainers/runtime-spec/specs-go"
type SpecOpts func(s *specs.Spec) error
func WithImageRef(ref string) SpecOpts {
return func(s *specs.Spec) error {
if s.Annotations == nil {
s.Annotations = make(map[string]string)
}
s.Annotations["image"] = ref
return nil
}
}
func WithArgs(args ...string) SpecOpts {
func WithProcessArgs(args ...string) SpecOpts {
return func(s *specs.Spec) error {
s.Process.Args = args
return nil