[Feature] Multi Platform Images #34

Closed
opened 2025-10-31 15:00:17 -05:00 by GiteaMirror · 6 comments
Owner

Originally created by @mbecker20 on GitHub (Aug 30, 2024).

Why make users have to specify their architecture with a different image tag? Multi platform images can solve this issue.

https://docs.docker.com/build/building/multi-platform/

Originally created by @mbecker20 on GitHub (Aug 30, 2024). Why make users have to specify their architecture with a different image tag? Multi platform images can solve this issue. [https://docs.docker.com/build/building/multi-platform/](https://docs.docker.com/build/building/multi-platform/)
GiteaMirror added the
done
label 2025-10-31 15:00:17 -05:00
Author
Owner

@tagpro commented on GitHub (Sep 8, 2024):

Facing this issue:

docker pull --platform=linux/arm64/v8 ghcr.io/mbecker20/periphery:latest-aarch64
latest-aarch64: Pulling from mbecker20/periphery
Digest: sha256:bd616228028a384dc9e64182c7d447c893f30641b70eb7cb57a3b0f2c4ee0bae
Status: Image is up to date for ghcr.io/mbecker20/periphery:latest-aarch64
image with reference ghcr.io/mbecker20/periphery:latest-aarch64 was found but does not match the specified platform: wanted linux/arm64/v8, actual: linux/amd64

arm tagged images are actually amd images

@tagpro commented on GitHub (Sep 8, 2024): Facing this issue: ``` docker pull --platform=linux/arm64/v8 ghcr.io/mbecker20/periphery:latest-aarch64 latest-aarch64: Pulling from mbecker20/periphery Digest: sha256:bd616228028a384dc9e64182c7d447c893f30641b70eb7cb57a3b0f2c4ee0bae Status: Image is up to date for ghcr.io/mbecker20/periphery:latest-aarch64 image with reference ghcr.io/mbecker20/periphery:latest-aarch64 was found but does not match the specified platform: wanted linux/arm64/v8, actual: linux/amd64 ``` arm tagged images are actually amd images
Author
Owner

@mbecker20 commented on GitHub (Sep 9, 2024):

Hey, this is fixed, i've saved the Build to use the correct arm based instance type now. Thanks for letting me know, apologies!

@mbecker20 commented on GitHub (Sep 9, 2024): Hey, this is fixed, i've saved the Build to use the correct arm based instance type now. Thanks for letting me know, apologies!
Author
Owner

@loan-mgt commented on GitHub (Sep 19, 2024):

Hi, there is another issue open to convert the images to true multi-platform. For now, arm support is user the ":latest-aarch64" tags:

* ghcr.io/mbecker20/komodo:latest-aarch64

* ghcr.io/mbecker20/periphery:latest-aarch64
@loan-mgt commented on GitHub (Sep 19, 2024): > Hi, there is another issue open to convert the images to true multi-platform. For now, arm support is user the ":latest-aarch64" tags: > > * ghcr.io/mbecker20/komodo:latest-aarch64 > > * ghcr.io/mbecker20/periphery:latest-aarch64
Author
Owner

@arevindh commented on GitHub (Nov 3, 2024):

Hello, I'm working on making my Node application compatible with both aarch64 and amd64 architectures.

Here’s the usual process I follow:

Step 1: Set up Docker Buildx

Ensure that buildx is available and initialized. If buildx isn’t already enabled in Docker, you can enable it by running:

docker buildx create --name mybuilder --use --bootstrap
docker buildx ls

Step 2: Build Multi-Platform Image

Use the following command to build and push a multi-platform image

docker buildx build --platform linux/arm64/v8,linux/amd64 --builder mybuilder -t yourusername/yourimagename:tag --push .

Explanation of Flags

  • --platform linux/amd64,linux/arm64 : Specifies the platforms to build for.
  • -t yourusername/yourimagename:tag : Tags the image.
  • --push : Pushes the built images directly to a Docker registry. This is necessary for multi-platform images as they must reside in a registry to be used effectively.

I managed to accomplish everything (100%) with Komodo, except for the creation of the builder, using Extra Args.

image

image

Issue

The build status fails during the final push step on the builder.

image

...... && docker image push --all-tags yourusername/yourimagename
#17 exporting to image
#17 pushing layers 11.0s done
#17 pushing manifest for yourusername/yourimagename:latest@sha256:05a35169efb6d6a6008645f649639856852fe0546112656d7ac2f1cfb7c125a0
#17 pushing manifest for yourusername/yourimagename:latest@sha256:05a35169efb6d6a6008645f649639856852fe0546112656d7ac2f1cfb7c125a0 0.2s done
#17 pushing layers 0.0s done
#17 pushing manifest for yourusername/yourimagename:0.0.8@sha256:05a35169efb6d6a6008645f649639856852fe0546112656d7ac2f1cfb7c125a0 0.1s done
#17 pushing layers 0.0s done
#17 pushing manifest for yourusername/yourimagename:0.0@sha256:05a35169efb6d6a6008645f649639856852fe0546112656d7ac2f1cfb7c125a0 0.1s done
#17 pushing layers 0.0s done
#17 pushing manifest for yourusername/yourimagename:0@sha256:05a35169efb6d6a6008645f649639856852fe0546112656d7ac2f1cfb7c125a0 0.1s done
#17 pushing layers 0.1s done
#17 pushing manifest for yourusername/yourimagename:482e101@sha256:05a35169efb6d6a6008645f649639856852fe0546112656d7ac2f1cfb7c125a0 0.1s done
#17 DONE 11.7s
An image does not exist locally with the tag: yourusername/yourimagename

You can also remove push --all-tags; with a normal build, it was also re-pushing all tags if a tag was deleted from the Docker registry.

@arevindh commented on GitHub (Nov 3, 2024): Hello, I'm working on making my Node application compatible with both `aarch64` and `amd64` architectures. Here’s the usual process I follow: ### Step 1: Set up Docker Buildx Ensure that buildx is available and initialized. If buildx isn’t already enabled in Docker, you can enable it by running: ``` docker buildx create --name mybuilder --use --bootstrap docker buildx ls ``` ### Step 2: Build Multi-Platform Image Use the following command to build and push a multi-platform image ``` docker buildx build --platform linux/arm64/v8,linux/amd64 --builder mybuilder -t yourusername/yourimagename:tag --push . ``` ### Explanation of Flags - `--platform linux/amd64,linux/arm64` : Specifies the platforms to build for. - -t `yourusername/yourimagename:tag` : Tags the image. - `--push` : Pushes the built images directly to a Docker registry. This is necessary for multi-platform images as they must reside in a registry to be used effectively. ### I managed to accomplish everything (100%) with Komodo, except for the creation of the builder, using `Extra Args.` ![image](https://github.com/user-attachments/assets/bc6e9db1-4725-424f-adae-ea111523db8b) ![image](https://github.com/user-attachments/assets/407e0306-61d5-4bdf-843d-2697daa4515d) ### Issue The build status fails during the final push step on the builder. ![image](https://github.com/user-attachments/assets/a911b260-469a-4b23-b2e7-a947ae50f6a1) ``` ...... && docker image push --all-tags yourusername/yourimagename ``` ``` #17 exporting to image #17 pushing layers 11.0s done #17 pushing manifest for yourusername/yourimagename:latest@sha256:05a35169efb6d6a6008645f649639856852fe0546112656d7ac2f1cfb7c125a0 #17 pushing manifest for yourusername/yourimagename:latest@sha256:05a35169efb6d6a6008645f649639856852fe0546112656d7ac2f1cfb7c125a0 0.2s done #17 pushing layers 0.0s done #17 pushing manifest for yourusername/yourimagename:0.0.8@sha256:05a35169efb6d6a6008645f649639856852fe0546112656d7ac2f1cfb7c125a0 0.1s done #17 pushing layers 0.0s done #17 pushing manifest for yourusername/yourimagename:0.0@sha256:05a35169efb6d6a6008645f649639856852fe0546112656d7ac2f1cfb7c125a0 0.1s done #17 pushing layers 0.0s done #17 pushing manifest for yourusername/yourimagename:0@sha256:05a35169efb6d6a6008645f649639856852fe0546112656d7ac2f1cfb7c125a0 0.1s done #17 pushing layers 0.1s done #17 pushing manifest for yourusername/yourimagename:482e101@sha256:05a35169efb6d6a6008645f649639856852fe0546112656d7ac2f1cfb7c125a0 0.1s done #17 DONE 11.7s An image does not exist locally with the tag: yourusername/yourimagename ``` You can also remove push --all-tags; with a normal build, it was also re-pushing all tags if a tag was deleted from the Docker registry.
Author
Owner

@mbecker20 commented on GitHub (Nov 3, 2024):

Excellent write up @arevindh, thank you.

@mbecker20 commented on GitHub (Nov 3, 2024): Excellent write up @arevindh, thank you.
Author
Owner

@mbecker20 commented on GitHub (Nov 15, 2024):

@arevindh Per your suggestion, it will just use --push flag with docker build starting from v1.16.11, rather than another call to docker image push. It works in all situations :). Thanks for the feedback!

@mbecker20 commented on GitHub (Nov 15, 2024): @arevindh Per your suggestion, it will just use `--push` flag with `docker build` starting from v1.16.11, rather than another call to `docker image push`. It works in all situations :). Thanks for the feedback!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/komodo#34
No description provided.