X Tutup
Skip to content

Commit 6ed7ec4

Browse files
authored
Merge pull request containerd#3872 from liaojh1998/ctr-run-readonly
Modify ctr run to search for read-only flag instead of readonly
2 parents 5af0dcb + 787be0e commit 6ed7ec4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmd/ctr/commands/run/run_unix.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,13 +116,13 @@ func NewContainer(ctx gocontext.Context, client *containerd.Client, context *cli
116116
cOpts = append(cOpts,
117117
containerd.WithImage(image),
118118
containerd.WithSnapshotter(snapshotter),
119-
// Even when "readonly" is set, we don't use KindView snapshot here. (#1495)
119+
// Even when "read-only" is set, we don't use KindView snapshot here. (#1495)
120120
// We pass writable snapshot to the OCI runtime, and the runtime remounts it as read-only,
121121
// after creating some mount points on demand.
122122
containerd.WithNewSnapshot(id, image),
123123
containerd.WithImageStopSignal(image, "SIGTERM"))
124124
}
125-
if context.Bool("readonly") {
125+
if context.Bool("read-only") {
126126
opts = append(opts, oci.WithRootFSReadonly())
127127
}
128128
if len(args) > 0 {

0 commit comments

Comments
 (0)
X Tutup