mirror of https://github.com/containers/podman.git
Merge pull request #17506 from rhatdan/build
Allow specification of podman --remote build -f -
This commit is contained in:
commit
83757ccb55
|
@ -218,7 +218,11 @@ func build(cmd *cobra.Command, args []string) error {
|
||||||
var containerFiles []string
|
var containerFiles []string
|
||||||
for _, f := range buildOpts.File {
|
for _, f := range buildOpts.File {
|
||||||
if f == "-" {
|
if f == "-" {
|
||||||
containerFiles = append(containerFiles, "/dev/stdin")
|
if len(args) == 0 {
|
||||||
|
args = append(args, "-")
|
||||||
|
} else {
|
||||||
|
containerFiles = append(containerFiles, "/dev/stdin")
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
containerFiles = append(containerFiles, f)
|
containerFiles = append(containerFiles, f)
|
||||||
}
|
}
|
||||||
|
|
|
@ -101,6 +101,12 @@ EOF
|
||||||
is "$output" "$rand_content" "reading generated file in image"
|
is "$output" "$rand_content" "reading generated file in image"
|
||||||
|
|
||||||
run_podman rmi -f build_test
|
run_podman rmi -f build_test
|
||||||
|
|
||||||
|
# Now try without specifying a context dir
|
||||||
|
run_podman build -t build_test -f - < $containerfile
|
||||||
|
is "$output" ".*COMMIT" "COMMIT seen in log"
|
||||||
|
|
||||||
|
run_podman rmi -f build_test
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "podman build - global runtime flags test" {
|
@test "podman build - global runtime flags test" {
|
||||||
|
|
Loading…
Reference in New Issue