@@ -297,7 +297,12 @@ example adds annotations to both the image index and manifests.
297297
298298``` hcl
299299target "default" {
300- output = [{ type = "image", name = "foo" }]
300+ output = [
301+ {
302+ type = "image"
303+ name = "foo"
304+ }
305+ ]
301306 annotations = ["index,manifest:org.opencontainers.image.authors=dvdksn"]
302307}
303308```
@@ -314,11 +319,11 @@ This attribute accepts the long-form CSV version of attestation parameters.
314319target "default" {
315320 attest = [
316321 {
317- type = "provenance",
318- mode = "max",
322+ type = "provenance"
323+ mode = "max"
319324 },
320325 {
321- type = "sbom",
326+ type = "sbom"
322327 }
323328 ]
324329}
@@ -336,12 +341,12 @@ This takes a list value, so you can specify multiple cache sources.
336341target "app" {
337342 cache-from = [
338343 {
339- type = "s3",
340- region = "eu-west-1",
344+ type = "s3"
345+ region = "eu-west-1"
341346 bucket = "mybucket"
342347 },
343348 {
344- type = "registry",
349+ type = "registry"
345350 ref = "user/repo:cache"
346351 }
347352 ]
@@ -360,12 +365,12 @@ This takes a list value, so you can specify multiple cache export targets.
360365target "app" {
361366 cache-to = [
362367 {
363- type = "s3",
364- region = "eu-west-1",
368+ type = "s3"
369+ region = "eu-west-1"
365370 bucket = "mybucket"
366371 },
367372 {
368- type = "inline",
373+ type = "inline"
369374 }
370375 ]
371376}
@@ -445,9 +450,9 @@ a context based on the pattern of the context value.
445450``` hcl
446451# docker-bake.hcl
447452target "app" {
448- contexts = {
449- alpine = "docker-image://alpine:3.13"
450- }
453+ contexts = {
454+ alpine = "docker-image://alpine:3.13"
455+ }
451456}
452457```
453458
@@ -462,9 +467,9 @@ RUN echo "Hello world"
462467``` hcl
463468# docker-bake.hcl
464469target "app" {
465- contexts = {
466- src = "../path/to/source"
467- }
470+ contexts = {
471+ src = "../path/to/source"
472+ }
468473}
469474```
470475
@@ -485,12 +490,13 @@ COPY --from=src . .
485490``` hcl
486491# docker-bake.hcl
487492target "base" {
488- dockerfile = "baseapp.Dockerfile"
493+ dockerfile = "baseapp.Dockerfile"
489494}
495+
490496target "app" {
491- contexts = {
492- baseapp = "target:base"
493- }
497+ contexts = {
498+ baseapp = "target:base"
499+ }
494500}
495501```
496502
@@ -507,11 +513,11 @@ functionality.
507513
508514``` hcl
509515target "lint" {
510- description = "Runs golangci-lint to detect style errors"
511- args = {
512- GOLANGCI_LINT_VERSION = null
513- }
514- dockerfile = "lint.Dockerfile"
516+ description = "Runs golangci-lint to detect style errors"
517+ args = {
518+ GOLANGCI_LINT_VERSION = null
519+ }
520+ dockerfile = "lint.Dockerfile"
515521}
516522```
517523
@@ -913,8 +919,15 @@ variable "HOME" {
913919
914920target "default" {
915921 secret = [
916- { type = "env", id = "KUBECONFIG" },
917- { type = "file", id = "aws", src = "${HOME}/.aws/credentials" },
922+ {
923+ type = "env"
924+ id = "KUBECONFIG"
925+ },
926+ {
927+ type = "file"
928+ id = "aws"
929+ src = "${HOME}/.aws/credentials"
930+ }
918931 ]
919932}
920933```
0 commit comments