Skip to content

Commit bf91869

Browse files
committed
buildkit: configure dockerfile syntax from environment
Signed-off-by: Justin Chadwell <[email protected]>
1 parent 981ff1d commit bf91869

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

cmd/bashbrew/docker.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,9 +276,14 @@ func dockerBuild(tag string, file string, context io.Reader, platform string) er
276276
}
277277
}
278278

279-
const dockerfileSyntax = "docker/dockerfile:1"
279+
const dockerfileSyntaxEnv = "BASHBREW_BUILDKIT_SYNTAX"
280280

281281
func dockerBuildxBuild(tag string, file string, context io.Reader, platform string) error {
282+
dockerfileSyntax, ok := os.LookupEnv(dockerfileSyntaxEnv)
283+
if !ok {
284+
return fmt.Errorf("missing %q", dockerfileSyntaxEnv)
285+
}
286+
282287
args := []string{
283288
"buildx",
284289
"build",

0 commit comments

Comments
 (0)