-
Notifications
You must be signed in to change notification settings - Fork 787
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
stage_executor: Add support for inline FROM --platform=
within Containerfile/Dockerfile
#3757
stage_executor: Add support for inline FROM --platform=
within Containerfile/Dockerfile
#3757
Conversation
d475fb9
to
64fe2b2
Compare
Please don't review this PR yet as this PR is a implementation of : openshift/imagebuilder#212 so lets wait for that. |
64fe2b2
to
26eab2e
Compare
26eab2e
to
4a6cf8b
Compare
@nalind @rhatdan PTAL. Also modified tests to also check if |
This PR closes two existing open issues. |
c42db9f
to
212b6fb
Compare
LGTM As soon as this is merged, we can cut a new release. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: flouthoc, rhatdan The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
425572d
to
995c7da
Compare
@test "build-with-inline-platform-amd-but-tag-as-arm" { | ||
# Host arch | ||
run_buildah info --format '{{.host.arch}}' | ||
myarch="$output" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be simpler to grep the output of buildah version
's BuildPlatform
, which provides the entire value you're looking to use.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nalind I need to toggle only arch
at certain places that's why i preferred this. Hope this is not a blocker.
a53b74b
to
f42b04d
Compare
f42b04d
to
b433cd7
Compare
Allows end users to configure executor's `OS`, `ARCH`,`VARIANT` via inline `--platform`. Usage ``` FROM --platform=linux/arm64 alpine RUN uname -a ``` While this allows executor to pull base images with custom `OS`, `ARCH`, `VARIANT` it still allows end-users to tag images with different format if they need to. Signed-off-by: Aditya R <[email protected]>
b433cd7
to
d1a9347
Compare
/lgtm |
See: https://docs.docker.com/engine/reference/builder/#from
Allows end users to configure executor's
OS
,ARCH
,VARIANT
via inline--platform
.Usage
While this allows executor to pull base images with custom
OS
,ARCH
,VARIANT
it still allows end-users to tag images withdifferent format if they need to.
For example
Doing a
buildah build --platform linux/amd64 -t test .
on below containerfile.Would result in tagging image as
linux/amd64
whilebase
layer wouldbe pulled for
linux/arm64
.Closes: #3712
Closes: #3261