Tuesday, July 9, 2024

Confused about Multi architecture ?


Are you confused 😕 about Multi architecture in Docker  ?  Just think of Shoes 👞.... yeah shoes and how you use them .. 

  • You have a shoe closet with multiple shoe types (e.g., running shoes, hiking boots, dress shoes)
  • Manual selection of the right shoe type for each activity
  • Appropriate footwear for various terrains and occasions
  • Central storage for all shoe types

Similarly Docker Multi-Architecture Images has 

  • One image tag, multiple CPU architectures (e.g., x86, ARM, PowerPC)
  • Automatic selection of the right architecture by the Docker runtime
  • Same application runs across diverse hardware platforms
  • Single management point for multiple architecture versions

Docker can still run anywhere right ?

Yes ,you can use the same shoe every where but not ideal right . Similarly traditional images are built for a specific architecture (e.g., x86-64 or ARM64). Multi-architecture images contain multiple versions of the same image, each built for a different architecture, bundled together under a single tag.

How does it do it ?

Multi-architecture images use manifest lists (also called fat manifests) to specify which image version should be used for each supported architecture. When a client pulls a multi-architecture image, Docker automatically selects the appropriate version based on the host system's architecture

Build is complicated ?

Yes kind of ,Multi-architecture images require separate builds for each target architecture, often using tools like Docker Buildx . Here is a example it not that difficult 

Github

Yeah , but like why .. What's the main advantage ?

Just like using the right shoe will give you the best performance and utilization . Multi-architecture images allow for more efficient use of resources by supporting diverse CPU architectures without maintaining separate images . This is especially realized in the cloud by using the correct architecture-specific image, you can achieve better resource utilization and potentially reduce costs, especially in cloud environments with diverse instance types 

Containerization Github List  ->   Github Containers

No comments:

Post a Comment

Should You Use Containers with Serverless Implementations?

Serverless implementations are usually Cloud Deployment-specific, AWS Lambda being the most popular implementation. However, there are some ...