-
Notifications
You must be signed in to change notification settings - Fork 297
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
Add support to choose docker build target architecture #1350
Add support to choose docker build target architecture #1350
Conversation
Thank you for opening this pull request! 🙌 These tips will help get your PR across the finish line:
|
c8272aa
to
d9ae67d
Compare
Codecov Report
@@ Coverage Diff @@
## master #1350 +/- ##
==========================================
+ Coverage 68.94% 69.04% +0.10%
==========================================
Files 291 291
Lines 26656 26699 +43
Branches 2508 2514 +6
==========================================
+ Hits 18377 18435 +58
+ Misses 7789 7772 -17
- Partials 490 492 +2
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
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.
I assume you tested the change.
Please fix DCO by following https://github.com/flyteorg/flytekit/pull/1350/checks?check_run_id=9764766999 |
6b078a4
to
4019a7a
Compare
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.
nit: There is a lint error, could you fix it?
|
||
# This build command is the raison d'etre of this script, it ensures that the version is injected into the image itself | ||
docker build . --build-arg tag="$FLYTE_INTERNAL_IMAGE" -t "$FLYTE_INTERNAL_IMAGE" -f "${DOCKERFILE_PATH}" | ||
eval "$(docker build ${DOCKER_PLATFORM_OPT} . --build-arg tag=${FLYTE_INTERNAL_IMAGE} -t ${FLYTE_INTERNAL_IMAGE} -f ${DOCKERFILE_PATH})" |
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.
I don't understand this change. Would the following not work?
docker build ${DOCKER_PLATFORM_OPT} . --build-arg tag=${FLYTE_INTERNAL_IMAGE} -t ${FLYTE_INTERNAL_IMAGE} -f ${DOCKERFILE_PATH}
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.
Let's check if the linter passes with that. The previous change was based on the linter's suggestion.
Signed-off-by: Andres Gomez Ferrer <andresg@spotify.com>
Signed-off-by: Andres Gomez Ferrer <andresg@spotify.com>
Signed-off-by: Andres Gomez Ferrer <andresg@spotify.com>
Co-authored-by: Honnix <honnix@users.noreply.github.com> Signed-off-by: Andres Gomez Ferrer <andresg@spotify.com>
d79f5d2
to
f442671
Compare
Signed-off-by: Hongxin Liang <honnix@users.noreply.github.com>
86232c7
to
bd96c45
Compare
Hopefully bd96c45 could fix the shellcheck issue. |
Signed-off-by: Hongxin Liang <honnix@users.noreply.github.com>
Congrats on merging your first pull request! 🎉 |
TL;DR
Add new
TARGET_PLATFORM_BUILD
ENV var to set the target platform architecture to allow to build docker image on a machine with a different architecture than the docker image will be executed.Type
Are all requirements met?
Complete description
NA
Tracking Issue
flyteorg/flyte#3097
Follow-up issue
NA