supervisor icon indicating copy to clipboard operation
supervisor copied to clipboard

Support for Docker manifests base images add-on build

Open frenck opened this issue 2 years ago • 2 comments

Proposed change

Since we support manifests now for add-on images, this PR set in motion to use a single base image for all architectures using a manifest, by allowing build_from to be a string (instead of mapping for each architecture).

So instead of doing this:

# build.yaml
build_from:
  aarch64: ghcr.io/hassio-addons/base:12.2.0
  amd64: ghcr.io/hassio-addons/base:12.2.0
  armhf: ghcr.io/hassio-addons/base:12.2.0
  armv7: ghcr.io/hassio-addons/base:12.2.0
  i386: ghcr.io/hassio-addons/base:12.2.0

This PR will also allow for this:

# build.yaml
build_from: ghcr.io/hassio-addons/base:12.2.0

Needs:

  • [ ] Documentation adjustments
  • [ ] Support for the builder to handle this
  • [ ] Adjustment to add-on linter GitHub Action

Type of change

  • [ ] Dependency upgrade
  • [ ] Bugfix (non-breaking change which fixes an issue)
  • [ ] New feature (which adds functionality to the supervisor)
  • [ ] Breaking change (fix/feature causing existing functionality to break)
  • [ ] Code quality improvements to existing code or addition of tests

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request:
  • Link to cli pull request:

Checklist

  • [ ] The code change is tested and works locally.
  • [ ] Local tests pass. Your PR cannot be merged unless tests pass
  • [ ] There is no commented out code in this PR.
  • [ ] I have followed the development checklist
  • [ ] The code has been formatted using Black (black --fast supervisor tests)
  • [ ] Tests have been added to verify that the new code works.

If API endpoints of add-on configuration are added/changed:

frenck avatar Jul 08 '22 10:07 frenck

on get_docker_args we should set the right platform as we do on docker pull

~~It does already? Or am missing something?~~ Oh we don't...

frenck avatar Jul 08 '22 11:07 frenck

If we do that, we can merge the PR

pvizeli avatar Jul 12 '22 09:07 pvizeli

@frenck @pvizeli FYI I rebased this, added the platform to get_docker_args and added a couple tests so I think this is ready now if you both want to take a look.

mdegat01 avatar Aug 15 '22 18:08 mdegat01

Oh shit totally forgot about this one 🙈 Thanks, @mdegat01 ❤️

frenck avatar Aug 15 '22 18:08 frenck

Looks good to me, however, I cannot approve as the PR author

frenck avatar Aug 15 '22 21:08 frenck