Skip to content

Commit 991ca1d

Browse files
committed
update docs/guides/functions.md: provenance option added for docker build
1 parent 0930fde commit 991ca1d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docs/guides/functions.md

+2
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,7 @@ Additionally, you can define arguments that will be passed to the `docker build`
300300
- `buildArgs`: With the `buildArgs` property, you can define arguments that will be passed to `docker build` command with `--build-arg` flag. They might be later referenced via `ARG` within your `Dockerfile`. (See [Documentation](https://docs.docker.com/engine/reference/builder/#arg))
301301
- `cacheFrom`: The `cacheFrom` property can be used to specify which images to use as a source for layer caching in the `docker build` command with `--cache-from` flag. (See [Documentation](https://docs.docker.com/engine/reference/builder/#usage))
302302
- `platform`: The `platform` property can be used to specify the architecture target in the `docker build` command with the `--platform` flag. If not specified, Docker will build for your computer's architecture by default. AWS Lambda typically uses `x86` architecture unless otherwise specified in the Lambda's runtime settings. In order to avoid runtime errors when building on an ARM-based machine (e.g. Apple M1 Mac), `linux/amd64` must be used here. The options for this flag are `linux/amd64` (`x86`-based Lambdas), `linux/arm64` (`arm`-based Lambdas), or `windows/amd64`. (See [Documentation](https://docs.docker.com/engine/reference/builder/#from))
303+
- `provenance` Use the `provenance` property to disable multi-architecture manifest generated from BuildKit or `docker buildx`, allows the architecture specified in `platform` to be recognized by AWS Lambda during deployment.
303304

304305
When `uri` is defined for an image, `buildArgs`, `cacheFrom`, and `platform` cannot be defined.
305306

@@ -320,6 +321,7 @@ provider:
320321
cacheFrom:
321322
- my-image:latest
322323
platform: linux/amd64
324+
provenance: false
323325
anotherimage:
324326
uri: 000000000000.dkr.ecr.sa-east-1.amazonaws.com/test-lambda-docker@sha256:6bb600b4d6e1d7cf521097177dd0c4e9ea373edb91984a505333be8ac9455d38
325327
```

0 commit comments

Comments
 (0)