Skip to content

Commit

Permalink
cli.BudFlags: add --platform nop
Browse files Browse the repository at this point in the history
Add the `--platform` option for Moby/Docker CLI-compat reasons.  This
option allows to control which platform (i.e., Windows or Linux) the
image will be build on and for.  Make this a nop as Buildah supports
only Linux.

Fixes: #629
Signed-off-by: Valentin Rothberg <[email protected]>

Closes: #1230
Approved by: rhatdan
  • Loading branch information
vrothberg authored and rh-atomic-bot committed Dec 11, 2018
1 parent dd0f4f1 commit 72c1fe9
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions contrib/completions/bash/buildah
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,7 @@ return 1
--network
--no-pivot
--pid
--platform
--runtime
--runtime-flag
--security-opt
Expand Down
6 changes: 6 additions & 0 deletions docs/buildah-bud.md
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,12 @@ that the PID namespace in which `buildah` itself is being run should be reused,
or it can be the path to a PID namespace which is already in use by another
process.

**--platform**="Linux"

This option has no effect on the build. Other container engines use this option
to control the execution platform for the build (e.g., Windows, Linux) which is
not required for Buildah as it supports only Linux.

**--pull**

Pull the image if it is not present. If this flag is disabled (with
Expand Down
4 changes: 4 additions & 0 deletions pkg/cli/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,10 @@ var (
Name: "loglevel",
Usage: "adjust logging level (range from -2 to 3)",
},
cli.StringFlag{
Name: "platform",
Usage: "CLI compatibility: no action or effect",
},
cli.BoolTFlag{
Name: "pull",
Usage: "pull the image if not present",
Expand Down

0 comments on commit 72c1fe9

Please sign in to comment.