Skip to content

Commit d1fc83c

Browse files
committed
Add comment for setting --provenance=false when building container images.
1 parent e22453f commit d1fc83c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Amazon.Common.DotNetCli.Tools/DockerCLIWrapper.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ public int Build(string workingDirectory, string dockerFile, string imageTag, st
3030

3131
var arguments = new StringBuilder();
3232

33+
// The --provenance=false switch is added to force docker to not build an image index which is an image with a manifest.
34+
// Lambda does not support containers of this type. This can be verified by running "docker inspect" on the build
35+
// image. The mediaType should be application/vnd.docker.distribution.manifest.v2+json but without
36+
// the --provenance=false the mediaType will be application/vnd.oci.image.index.v1+json.
3337
if (arm64Build)
3438
{
3539
arguments.Append($"buildx build --platform linux/arm64 --provenance=false ");

0 commit comments

Comments
 (0)