Skip to content

Commit 8dfbccc

Browse files
wkingMa Shimiao
authored andcommitted
*: Fix --bind -> --mount-bind, etc. (#426)
* *: Fix --bind, --cwd, etc missed options Adjusting some option instances that were missed in 9c3863b (generate: rectify the arguments, 2017-04-24, #371). Signed-off-by: W. Trevor King <[email protected]>
1 parent 6d80521 commit 8dfbccc

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

cmd/oci-runtime-tool/generate.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -623,11 +623,11 @@ func parseBindMount(s string) (string, string, []string, error) {
623623
case 3:
624624
source, dest, options = bparts[0], bparts[1], strings.Split(bparts[2], ":")
625625
default:
626-
return source, dest, options, fmt.Errorf("--bind should have format src:dest[:options...]")
626+
return source, dest, options, fmt.Errorf("--mount-bind should have format src:dest[:options...]")
627627
}
628628

629629
if source == "" || dest == "" {
630-
return source, dest, options, fmt.Errorf("--bind should have format src:dest[:options...]")
630+
return source, dest, options, fmt.Errorf("--mount-bind should have format src:dest[:options...]")
631631
}
632632
return source, dest, options, nil
633633
}

completions/bash/oci-runtime-tool

100644100755
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ _oci-runtime-tool_generate() {
412412
return
413413
;;
414414

415-
--rootfs|--tmpfs|--bind|--cwd)
415+
--rootfs-path|--tmpfs|--mount-bind|--process-cwd)
416416
case "$cur" in
417417
*:*)
418418
# TODO somehow do _filedir for stuff inside the image, if it's already specified (which is also somewhat difficult to determine)

man/oci-runtime-tool-generate.1.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ tmpfs directories on /generate and /tmp.
350350
If you want messages that are logged in your container to show up in the host's
351351
syslog/journal then you should bind mount the /dev/log directory as follows.
352352

353-
$ oci-runtime-tool generate --bind /dev/log:/dev/log --rootfs-path /var/lib/containers/fedora --args bash
353+
$ oci-runtime-tool generate --mount-bind /dev/log:/dev/log --rootfs-path /var/lib/containers/fedora --args bash
354354

355355
From inside the container you can test this by sending a message to the log.
356356

0 commit comments

Comments
 (0)