You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@shykes Issue was auto-closed by mistake by GitHub because I mentioned it in the PR, re-opened.
Review still needed
The fields are currently in. It's the same code from op.#DockerBuild, ported to engine.#Build which supports them
platforms and target: I honestly have no idea. They are passed verbatim to the dockerfile.v0 buildkit frontend. I believe multi-platform support will change this, I don't know how yet
auth we do need like in #Push and #Pull (e.g. FROM private.registry)
buildArg / label / hosts: Were added for @dubo-dubon-duponey in op.#DockerBuild
@aluzzardi does this look correct to you? Note the red question marks where I am least sure :)
Assuming everything is a direct pass-through to dockerfile.v0, then I think we should keep it (and consider renaming engine.#Build to perhaps engine.#Dockerfile :). If it’s not, then I’ll open an issue to discuss those.
Field
Rationale
Status
Pending decisions
auth
Authenticate nested push / pull operations
Merged
None
platforms
Pass verbatim to dockerfile buildkit frontend
Merged
Confirm that we want it
target
Pass verbatim to dockerfile buildkit frontend
Merged
Confirm that we want it
buildArg
Pass verbatim to dockerfile buildkit frontend
Merged
Confirm that we want it
label
Pass verbatim to dockerfile buildkit frontend
Merged
Confirm that we want it
hosts
Pass verbatim to dockerfile buildkit frontend
Merged
Confirm that we want it
EDIT: removed question marks per @aluzzardi answers.
Wrapping up. It looks like all items here are resolved. There is an outstanding question on platforms (how do we use the output?), which is to be addressed as part of #1371 .
For platforms, either A) remove it for now, or B) leave it in with the understanding that it might change once Multi-platform containers #1371 is settled (same as the top-level platform field).
For platforms, either A) remove it for now, or B) leave it in with the understanding that it might change once Multi-platform in Europa Multi-platform containers #1371 is settled (same as the top-level platform field).
👍
@TomChv Is it much work to remove platforms (at least from the CUE spec), until we flush out #1371 ?
Activity
shykes commentedon Jan 4, 2022
@aluzzardi this is marked as closed by PR #1276, but it’s not clear what the status of
platformsandtargetis.aluzzardi commentedon Jan 5, 2022
@shykes Issue was auto-closed by mistake by GitHub because I mentioned it in the PR, re-opened.
op.#DockerBuild, ported toengine.#Buildwhich supports themplatformsandtarget: I honestly have no idea. They are passed verbatim to thedockerfile.v0buildkit frontend. I believe multi-platform support will change this, I don't know how yetauthwe do need like in#Pushand#Pull(e.g.FROM private.registry)buildArg/label/hosts: Were added for @dubo-dubon-duponey inop.#DockerBuildshykes commentedon Jan 5, 2022
OK, makes sense. It looks like everything is a direct mapping of the actual underlying API for dockerfile frontend. That’s pretty reasonable IMO.
shykes commentedon Jan 5, 2022
@aluzzardi does this look correct to you? Note the red question marks where I am least sure :)
Assuming everything is a direct pass-through to
dockerfile.v0, then I think we should keep it (and consider renamingengine.#Buildto perhapsengine.#Dockerfile:). If it’s not, then I’ll open an issue to discuss those.authplatformstargetbuildArglabelhostsEDIT: removed question marks per @aluzzardi answers.
aluzzardi commentedon Jan 5, 2022
Yes to all red questions.
There's slight transformation for some fields:
hosts(string array) is actually aadd-hostcomma separated string in the frontendplatforms(string array) is actually aplatformcomma separated string in the frontendTomChv commentedon Jan 6, 2022
I want to clarify a point about
#BuildAccording to the following definition :
And your comments,
platformscan contains several values. For example["linux/amd64", "linux/arm64"](or comma separated).If we do this, then we need to supports multiple
output.When you build something in
multi-platformwith buildkit, it will creates a reference for each platform so we will haveone output for each platform.
So, if we keep that logic, should we add a new field in case of multi platform to retrieves those outputs?
For example
This way, if build something in 2 platforms, we can retrieves it using the platform.
Example
I don't know if it's a good solution but it could go beyond issues I've met with
#upwhen I was working on the multi-platform build & push.helderco commentedon Jan 7, 2022
I've had to fork
#Buildto addtarget. If using a Dockerfile build, I have use fortargetandbuildArgs.aluzzardi commentedon Jan 7, 2022
@helderco Can you share how you're using
targetso we can incorporate?helderco commentedon Jan 7, 2022
If you have a multi-stage
Dockerfile, you can make an image out of any stage, instead of having to create separateDockerfiles.helderco commentedon Jan 7, 2022
Here's an example of a ported bash script to dagger (partial).
aluzzardi commentedon Jan 7, 2022
@helderco Oh, I see: it targets a specific named stage in
Dockerfile(e.g.FROM foo AS target->docker build --target "target"). Is that so?helderco commentedon Jan 7, 2022
@aluzzardi, yes it is 👍
aluzzardi commentedon Jan 7, 2022
Okay, perfect. So
engine.#Buildsupports this in the way that works for you, correct?helderco commentedon Jan 8, 2022
Yes
shykes commentedon Jan 10, 2022
Wrapping up. It looks like all items here are resolved. There is an outstanding question on
platforms(how do we use the output?), which is to be addressed as part of #1371 .@aluzzardi here’s what I suggest:
platforms, either A) remove it for now, or B) leave it in with the understanding that it might change once Multi-platform containers #1371 is settled (same as the top-levelplatformfield).I’m fine either way so up to you.
aluzzardi commentedon Jan 25, 2022
👍
👍
@TomChv Is it much work to remove
platforms(at least from the CUE spec), until we flush out #1371 ?