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

buildah bud --platform functionality missing #629

Closed
TomSweeneyRedHat opened this issue Apr 24, 2018 · 11 comments
Closed

buildah bud --platform functionality missing #629

TomSweeneyRedHat opened this issue Apr 24, 2018 · 11 comments

Comments

@TomSweeneyRedHat
Copy link
Member

Description
buildah bud --platform is missing and needs to be provided. This is functionality that Docker has.

#599 is the parent issue for this issue.

Output of buildah version:

Buildah v0.16

@pixdrift
Copy link
Contributor

@TomSweeneyRedHat, need minor edit to issue name to add --platform

@TomSweeneyRedHat
Copy link
Member Author

@pixdrift, darn tricky cut/paste tricks. TY!

@TomSweeneyRedHat TomSweeneyRedHat changed the title buildah bud functionality missing buildah bud --platform functionality missing Apr 25, 2018
@TomSweeneyRedHat
Copy link
Member Author

OK, tried to reset the title one more time....

@rhatdan
Copy link
Member

rhatdan commented Aug 2, 2018

Does anyone know what this is. Probably something like

buildah bud --platform i686 and then allows you to create 32 bit containers on a a 64 bit machine?

@TomSweeneyRedHat
Copy link
Member Author

@rhatdan, you're example is my understanding of what --platform does, or at least is intended to do.

@rhatdan
Copy link
Member

rhatdan commented Aug 2, 2018

I guess this would only inform the from command or buildah command to tell containers/image to pull images with that architecture. Probably would not be that difficult.

WDYT @mtrmac

@mtrmac
Copy link
Contributor

mtrmac commented Aug 2, 2018

Sure, c/image can be told which platform (and which OS) to use when pulling images (types.SystemContext.ArchitectureChoice, types.SystemContext.OSChoice). That’s trivial.

I don’t know how RunC deals with cross-architecture containers, and it will make it much more noticeable that the host and container environments may differ for buildah users, e.g. somebody will need to make sure dnf --installroot ${buildah_mounted_dir} does the right thing (and can work at all), or document the necessary extra options. I suppose as long as the kernel can executables for the target platform at all (i.e. mostly 32-on-64, same architecture), it should all be possible but it may get tricky. (Or maybe this has all been extensively researched, tested, and is known to work, and I’m just unaware.)

After implementing this, at some point the question of creating (not just consuming) multi-arch images will probably come up, i.e. something like containers/podman#713 or a related Buildah feature.

@rhatdan
Copy link
Member

rhatdan commented Nov 27, 2018

@vrothberg or @umohnani8 Would you like to take a look at this?

@vrothberg
Copy link
Member

@vrothberg or @umohnani8 Would you like to take a look at this?

I can start looking into it next week. But @umohnani8, feel free to tackle it before if you want to :)

@vrothberg
Copy link
Member

Does anyone know what this is. Probably something like

buildah bud --platform i686 and then allows you to create 32 bit containers on a a 64 bit machine?

The semantics of the --platform flag are actually quite different. In this context, platform refers to Linux, Windows, etc. and is mainly used to support use-cases for Docker on Windows where Linux images can be executed via Hyper-V.

I think that we cannot support it 🙉 but we could add this flag (and maybe similar cases) as a nop? @rhatdan WDYT?

@rhatdan
Copy link
Member

rhatdan commented Dec 5, 2018

SGTM

vrothberg added a commit to vrothberg/buildah that referenced this issue Dec 8, 2018
Add the `--platform` option for Moby/Docker CLI-compat reasons.  This
option allows to control which platform (i.e., Windows or Linux) the
image will be build on and for.  Make this a nop as Buildah supports
only Linux.

Fixes: containers#629
Signed-off-by: Valentin Rothberg <[email protected]>
vrothberg added a commit to vrothberg/buildah that referenced this issue Dec 10, 2018
Add the `--platform` option for Moby/Docker CLI-compat reasons.  This
option allows to control which platform (i.e., Windows or Linux) the
image will be build on and for.  Make this a nop as Buildah supports
only Linux.

Fixes: containers#629
Signed-off-by: Valentin Rothberg <[email protected]>
vrothberg added a commit to vrothberg/buildah that referenced this issue Dec 11, 2018
Add the `--platform` option for Moby/Docker CLI-compat reasons.  This
option allows to control which platform (i.e., Windows or Linux) the
image will be build on and for.  Make this a nop as Buildah supports
only Linux.

Fixes: containers#629
Signed-off-by: Valentin Rothberg <[email protected]>
rh-atomic-bot pushed a commit that referenced this issue Dec 11, 2018
Add the `--platform` option for Moby/Docker CLI-compat reasons.  This
option allows to control which platform (i.e., Windows or Linux) the
image will be build on and for.  Make this a nop as Buildah supports
only Linux.

Fixes: #629
Signed-off-by: Valentin Rothberg <[email protected]>

Closes: #1230
Approved by: rhatdan
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants