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

fix(docker): multi-architecture image build #23409

Merged

Conversation

EugeneTorap
Copy link
Contributor

SUMMARY

We have a problem with multi-architecture image building:

docker buildx build --no-cache --platform=linux/amd64,linux/arm64 --rm -t superset --push .

Because we build first stage twice on amd64 and arm64 arch
This PR provides --platform=$BUILDPLATFORM flag in UI layer that ensures that this stage is build once and reuse at the second layer even if we do a multi-arch build. It's Cross-Compilation image building

Useful Article - https://www.docker.com/blog/faster-multi-platform-builds-dockerfile-cross-compilation-guide/

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

image
Blue contains x86 binaries, yellow ARM binaries.

TESTING INSTRUCTIONS

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@EugeneTorap EugeneTorap force-pushed the fix/docker-image/multi-arch-build branch from 284fc72 to ee08564 Compare March 17, 2023 13:16
@craig-rueda craig-rueda merged commit d4657f6 into apache:master Mar 17, 2023
@EugeneTorap EugeneTorap deleted the fix/docker-image/multi-arch-build branch March 17, 2023 14:25
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 3.0.0 labels Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/XS 🚢 3.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants