From 787be0efe2831764e6e0599adbfce3c38fb90e92 Mon Sep 17 00:00:00 2001 From: Jie Hao Liao Date: Wed, 4 Dec 2019 00:15:44 -0600 Subject: [PATCH] Modify ctr run to search for read-only flag instead of readonly Signed-off-by: Jie Hao Liao --- cmd/ctr/commands/run/run_unix.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/ctr/commands/run/run_unix.go b/cmd/ctr/commands/run/run_unix.go index 77a599475..b733984f8 100644 --- a/cmd/ctr/commands/run/run_unix.go +++ b/cmd/ctr/commands/run/run_unix.go @@ -116,13 +116,13 @@ func NewContainer(ctx gocontext.Context, client *containerd.Client, context *cli cOpts = append(cOpts, containerd.WithImage(image), containerd.WithSnapshotter(snapshotter), - // Even when "readonly" is set, we don't use KindView snapshot here. (#1495) + // Even when "read-only" is set, we don't use KindView snapshot here. (#1495) // We pass writable snapshot to the OCI runtime, and the runtime remounts it as read-only, // after creating some mount points on demand. containerd.WithNewSnapshot(id, image), containerd.WithImageStopSignal(image, "SIGTERM")) } - if context.Bool("readonly") { + if context.Bool("read-only") { opts = append(opts, oci.WithRootFSReadonly()) } if len(args) > 0 {