buildah --platform to take os/arch format and set default ARGS {BUILD|TARGET}{PLATFORM|OS|ARCH|VARIANT}

Created on 26 Feb 2019  路  15Comments  路  Source: containers/buildah

When building on docker a number of default arguments can be used to create a cross build package explicit arguments without relying on on shell RUN commands to determine the native architecture.

Docker ref: https://docs.docker.com/engine/reference/builder/#automatic-platform-args-in-the-global-scope

These could also set the required docker v1/v2 schema without the use of buildah config.

kinfeature

Most helpful comment

I'm mostly there:
https://github.com/grooverdan/buildah/tree/args-target-platform

Remaining implementation:

  • Complete a working test case
  • Ensure FROM directives pull from the os/arch
  • Ensure output images is tagged with os/arch
  • Some mounting of the qemu executable of /proc/sys/fs/binfmt_misc/qemu-${arch} while building(?)

All 15 comments

@grooverdan I would be fine with adding support for these? Are you interested in opening a PR for them?

Doesn't seem too bad. Got a few other work items to clear first. Warning - it will be the first golang code I've written.

No Problem. You'll enjoy the experience.

@grooverdan Have you gotten back to this?

Started pottering and adding code fragments in the right place, haven't forgotten and its formally on my work plan of things to do.

@grooverdan Are you still interested in this? Should I have @ashley-cui Take a stab?

I'm mostly there:
https://github.com/grooverdan/buildah/tree/args-target-platform

Remaining implementation:

  • Complete a working test case
  • Ensure FROM directives pull from the os/arch
  • Ensure output images is tagged with os/arch
  • Some mounting of the qemu executable of /proc/sys/fs/binfmt_misc/qemu-${arch} while building(?)

2241 :balloon: continuing.....

What is left to do?

I rebased it all yesterday. Need to go through the test failures and fix some of the plumbing with the executor stages removed. Expect this to be submitted in the next few days.

Hello. Any more progress on this?

@grooverdan Are you still looking at this?

haven't forgotten it but got much further down my to look at queue. Got as far as https://github.com/grooverdan/buildah/tree/args-target-platform_2 during a rebase but there's gaps (which I can't remember at the moment)

@grooverdan Ping again.

@rhatdan I'm so sorry. I've left IBM and with my current focus I doubt I'll ever get time do reaquaint my understanding with the buildah codebase again. I'll leave the partial rebase there if some has the time to identify the gaps I've left. Hopefully the test suite is in a good enough state in the branch to identify gaps.

Was this page helpful?
0 / 5 - 0 ratings