aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--internal/sandbox/container.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/internal/sandbox/container.go b/internal/sandbox/container.go
index 6676a2a9..fff1d9d8 100644
--- a/internal/sandbox/container.go
+++ b/internal/sandbox/container.go
@@ -114,6 +114,9 @@ func (p *Container) Start() error {
if p.cmd != nil {
return errors.New("sandbox: already started")
}
+ if p.Ops == nil || len(*p.Ops) == 0 {
+ return errors.New("sandbox: starting an empty container")
+ }
c, cancel := context.WithCancel(p.ctx)
p.cancel = cancel