mirror of
https://github.com/clearlinux/docker.git
synced 2026-09-06 21:51:33 +00:00
Generate an error on unknown Dockerfile instruction
Instead of just printing a warning and going on, this will generate an error and stop processing. This used to be part of #10561 but I decided it might need its own independent discussion/PR as to not derail #10561. Signed-off-by: Doug Davis <dug@us.ibm.com>
This commit is contained in:
@@ -4343,16 +4343,16 @@ func TestBuildCmdJSONNoShDashC(t *testing.T) {
|
||||
logDone("build - cmd should not have /bin/sh -c for json")
|
||||
}
|
||||
|
||||
func TestBuildIgnoreInvalidInstruction(t *testing.T) {
|
||||
func TestBuildErrorInvalidInstruction(t *testing.T) {
|
||||
name := "testbuildignoreinvalidinstruction"
|
||||
defer deleteImages(name)
|
||||
|
||||
out, _, err := buildImageWithOut(name, "FROM busybox\nfoo bar", true)
|
||||
if err != nil {
|
||||
t.Fatal(err, out)
|
||||
if err == nil {
|
||||
t.Fatalf("Should have failed: %s", out)
|
||||
}
|
||||
|
||||
logDone("build - ignore invalid Dockerfile instruction")
|
||||
logDone("build - error invalid Dockerfile instruction")
|
||||
}
|
||||
|
||||
func TestBuildEntrypointInheritance(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user