Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix image builds #6862

Merged
merged 1 commit into from
Jan 24, 2023
Merged

Fix image builds #6862

merged 1 commit into from
Jan 24, 2023

Conversation

damonbarry
Copy link
Member

@damonbarry damonbarry commented Jan 24, 2023

Docker recently introduced provenance attestation in buildx 0.10.0, which broke our multi-arch image builds. By default, docker buildx build now defaults to --provenance true which causes even single-architecture images to be built as a manifest list (aka multi-arch image consisting of one architecture, according to this GitHub issue comment). When we use our older manifest-tool to create a manifest from three single-arch images (amd64, arm32v7, and arm64v8), the tool fails because it can't create a manifest list that points to other manifest lists.

To mitigate, we'll disable provenance attestation for now. In the future we should look at updating how we create our multi-arch images.

To test, I ran the CI build and end-to-end tests to confirm the images build successfully and function as expected.

Azure IoT Edge PR checklist:

This checklist is used to make sure that common guidelines for a pull request are followed.

General Guidelines and Best Practices

  • I have read the contribution guidelines.
  • Title of the pull request is clear and informative.
  • Description of the pull request includes a concise summary of the enhancement or bug fix.

Testing Guidelines

  • Pull request includes test coverage for the included changes.
  • Description of the pull request includes
    • concise summary of tests added/modified
    • local testing done.

@damonbarry damonbarry marked this pull request as ready for review January 24, 2023 18:59
@kodiakhq kodiakhq bot merged commit f82a7d9 into Azure:main Jan 24, 2023
@damonbarry damonbarry deleted the fix-image-builds branch January 24, 2023 20:57
damonbarry added a commit to damonbarry/iotedge that referenced this pull request Jan 25, 2023
Docker recently introduced [provenance attestation](https://docs.docker.com/build/attestations/slsa-provenance/) in buildx 0.10.0, which broke our multi-arch image builds. By default, `docker buildx build` now defaults to `--provenance true` which causes even single-architecture images to be built as a manifest list (aka multi-arch image consisting of one architecture, according to this GitHub issue [comment](docker/buildx#1509 (comment))). When we use our older manifest-tool to create a manifest from three single-arch images (amd64, arm32v7, and arm64v8), the tool fails because it can't create a manifest list that points to other manifest lists.

To mitigate, we'll disable provenance attestation for now. In the future we should look at updating how we create our multi-arch images.

To test, I ran the CI build and end-to-end tests to confirm the images build successfully and function as expected.

## Azure IoT Edge PR checklist:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants