summaryrefslogtreecommitdiffhomepage
path: root/runsc/cmd/start.go
diff options
context:
space:
mode:
Diffstat (limited to 'runsc/cmd/start.go')
-rw-r--r--runsc/cmd/start.go11
1 files changed, 9 insertions, 2 deletions
diff --git a/runsc/cmd/start.go b/runsc/cmd/start.go
index 0205fd9f7..139edbd49 100644
--- a/runsc/cmd/start.go
+++ b/runsc/cmd/start.go
@@ -18,9 +18,10 @@ import (
"context"
"github.com/google/subcommands"
- "gvisor.dev/gvisor/runsc/boot"
+ "gvisor.dev/gvisor/runsc/config"
"gvisor.dev/gvisor/runsc/container"
"gvisor.dev/gvisor/runsc/flag"
+ "gvisor.dev/gvisor/runsc/specutils"
)
// Start implements subcommands.Command for the "start" command.
@@ -52,12 +53,18 @@ func (*Start) Execute(_ context.Context, f *flag.FlagSet, args ...interface{}) s
}
id := f.Arg(0)
- conf := args[0].(*boot.Config)
+ conf := args[0].(*config.Config)
c, err := container.Load(conf.RootDir, id)
if err != nil {
Fatalf("loading container: %v", err)
}
+ // Read the spec again here to ensure flag annotations from the spec are
+ // applied to "conf".
+ if _, err := specutils.ReadSpec(c.BundleDir, conf); err != nil {
+ Fatalf("reading spec: %v", err)
+ }
+
if err := c.Start(conf); err != nil {
Fatalf("starting container: %v", err)
}