skip to Main Content

I have DockerHub set up to autobuild my Dockerfile stored in a BitBucket repository. Every time a modification is made to the Dockerfile, and this works fine https://bitbucket.org/ijabz/songkongdocker/src/master/Dockerfile

I also have a separate repostitory https://bitbucket.org/ijabz/songkongdockerarm32/src/master/Dockerfile that builds an arm32 version of the application and I have been building this manually on an arm32 based qnap, but I have problems with my qnap so would like to be built on Dockerhub

I configured it but the build failed, its not clear to me if I have to do something special to buld arm32 builds or if it is not possible

Dockerhub build fails as follows

2024-06-18T11:34:21Z Cloning into '.'...
2024-06-18T11:34:22Z Warning: Permanently added the ECDSA host key for IP address '18.205.93.0' to the list of known hosts.
2024-06-18T11:34:23Z Reset branch 'master'
2024-06-18T11:34:23Z Your branch is up to date with 'origin/master'.
2024-06-18T11:34:23Z KernelVersion: 5.4.0-1068-aws
2024-06-18T11:34:23Z Components: [{u'Version': u'20.10.15', u'Name': u'Engine', u'Details': {u'KernelVersion': u'5.4.0-1068-aws', u'Os': u'linux', u'BuildTime': u'2022-05-05T13:17:24.000000000+00:00', u'ApiVersion': u'1.41', u'MinAPIVersion': u'1.12', u'GitCommit': u'4433bf6', u'Arch': u'amd64', u'Experimental': u'false', u'GoVersion': u'go1.17.9'}}, {u'Version': u'1.6.21', u'Name': u'containerd', u'Details': {u'GitCommit': u'3dce8eb055cbb6872793272b4f20ed16117344f8'}}, {u'Version': u'1.1.7', u'Name': u'runc', u'Details': {u'GitCommit': u'v1.1.7-0-g860f061'}}, {u'Version': u'0.19.0', u'Name': u'docker-init', u'Details': {u'GitCommit': u'de40ad0'}}]
2024-06-18T11:34:23Z Arch: amd64
2024-06-18T11:34:23Z BuildTime: 2022-05-05T13:17:24.000000000+00:00
2024-06-18T11:34:23Z ApiVersion: 1.41
2024-06-18T11:34:23Z Platform: {u'Name': u'Docker Engine - Community'}
2024-06-18T11:34:23Z Version: 20.10.15
2024-06-18T11:34:23Z MinAPIVersion: 1.12
2024-06-18T11:34:23Z GitCommit: 4433bf6
2024-06-18T11:34:23Z Os: linux
2024-06-18T11:34:23Z GoVersion: go1.17.9
2024-06-18T11:34:23Z Buildkit: Starting build for index.docker.io/songkong/songkong-arm32:latest...
2024-06-18T11:34:30Z #1 [internal] load build definition from Dockerfile
2024-06-18T11:34:30Z #1 transferring dockerfile: 1.01kB done
2024-06-18T11:34:30Z #1 DONE 0.1s
2024-06-18T11:34:30Z 
2024-06-18T11:34:30Z #2 [internal] load .dockerignore
2024-06-18T11:34:30Z #2 transferring context:
2024-06-18T11:34:30Z #2 transferring context: 2B done
2024-06-18T11:34:30Z #2 DONE 0.1s
2024-06-18T11:34:30Z 
2024-06-18T11:34:30Z #3 [auth] library/centos:pull token for registry-1.docker.io
2024-06-18T11:34:30Z #3 DONE 0.0s
2024-06-18T11:34:30Z 
2024-06-18T11:34:30Z #4 [auth] adoptopenjdk/openjdk14:pull token for registry-1.docker.io
2024-06-18T11:34:30Z #4 DONE 0.0s
2024-06-18T11:34:30Z 
2024-06-18T11:34:30Z #5 [internal] load metadata for docker.io/adoptopenjdk/openjdk14:armv7l-centos-jdk-14.0.2_12
2024-06-18T11:34:30Z #5 DONE 0.7s
2024-06-18T11:34:30Z 
2024-06-18T11:34:30Z #6 [internal] load metadata for docker.io/library/centos:7
2024-06-18T11:34:30Z #6 DONE 0.6s
2024-06-18T11:34:31Z 
2024-06-18T11:34:31Z #7 [build 1/4] FROM docker.io/adoptopenjdk/openjdk14:armv7l-centos-jdk-14.0.2_12@sha256:b4688d55ba6fe65b1810a6e5fbc2bed5e29ce977e696b6d2e9dbe092a44f0371
2024-06-18T11:34:31Z #7 resolve docker.io/adoptopenjdk/openjdk14:armv7l-centos-jdk-14.0.2_12@sha256:b4688d55ba6fe65b1810a6e5fbc2bed5e29ce977e696b6d2e9dbe092a44f0371 0.0s done
2024-06-18T11:34:31Z #7 sha256:b4688d55ba6fe65b1810a6e5fbc2bed5e29ce977e696b6d2e9dbe092a44f0371 954B / 954B done
2024-06-18T11:34:31Z #7 sha256:b4789a50a8510ef026ba8cb1b8e0365a69edb4d85fa356ebafb35b7578e0ab3e 5.26kB / 5.26kB done
2024-06-18T11:34:31Z #7 sha256:193bcbf05ff9ae85ac1a58cacd9c07f8f4297dc648808c347cceb3797ae603af 0B / 70.03MB 0.1s
2024-06-18T11:34:31Z #7 sha256:83c03e4400804660ec377662b61bf20e68e92abd1a635726b631c1803e63f56a 0B / 66.36MB 0.1s
2024-06-18T11:34:31Z #7 sha256:0b55b0b0b22c736247c0d6dc7b21b2447811e560821da1daacedd4f669556a2e 0B / 198.00MB 0.1s
2024-06-18T11:34:31Z #7 sha256:193bcbf05ff9ae85ac1a58cacd9c07f8f4297dc648808c347cceb3797ae603af 5.24MB / 70.03MB 0.3s
2024-06-18T11:34:31Z #7 sha256:83c03e4400804660ec377662b61bf20e68e92abd1a635726b631c1803e63f56a 9.44MB / 66.36MB 0.3s
2024-06-18T11:34:31Z #7 sha256:193bcbf05ff9ae85ac1a58cacd9c07f8f4297dc648808c347cceb3797ae603af 10.49MB / 70.03MB 0.4s
2024-06-18T11:34:31Z #7 sha256:83c03e4400804660ec377662b61bf20e68e92abd1a635726b631c1803e63f56a 13.63MB / 66.36MB 0.4s
2024-06-18T11:34:31Z #7 sha256:193bcbf05ff9ae85ac1a58cacd9c07f8f4297dc648808c347cceb3797ae603af 14.80MB / 70.03MB 0.6s
2024-06-18T11:34:31Z #7 sha256:83c03e4400804660ec377662b61bf20e68e92abd1a635726b631c1803e63f56a 20.97MB / 66.36MB 0.6s
2024-06-18T11:34:31Z #7 sha256:193bcbf05ff9ae85ac1a58cacd9c07f8f4297dc648808c347cceb3797ae603af 18.87MB / 70.03MB 0.7s
2024-06-18T11:34:31Z #7 sha256:83c03e4400804660ec377662b61bf20e68e92abd1a635726b631c1803e63f56a 26.21MB / 66.36MB 0.7s
2024-06-18T11:34:31Z #7 sha256:0b55b0b0b22c736247c0d6dc7b21b2447811e560821da1daacedd4f669556a2e 11.53MB / 198.00MB 0.7s
2024-06-18T11:34:32Z #7 sha256:193bcbf05ff9ae85ac1a58cacd9c07f8f4297dc648808c347cceb3797ae603af 24.12MB / 70.03MB 0.9s
2024-06-18T11:34:32Z #7 sha256:83c03e4400804660ec377662b61bf20e68e92abd1a635726b631c1803e63f56a 31.46MB / 66.36MB 0.9s
2024-06-18T11:34:32Z #7 sha256:193bcbf05ff9ae85ac1a58cacd9c07f8f4297dc648808c347cceb3797ae603af 29.36MB / 70.03MB 1.1s
2024-06-18T11:34:32Z #7 sha256:83c03e4400804660ec377662b61bf20e68e92abd1a635726b631c1803e63f56a 38.80MB / 66.36MB 1.1s
2024-06-18T11:34:32Z #7 sha256:0b55b0b0b22c736247c0d6dc7b21b2447811e560821da1daacedd4f669556a2e 28.31MB / 198.00MB 1.1s
2024-06-18T11:34:32Z #7 sha256:193bcbf05ff9ae85ac1a58cacd9c07f8f4297dc648808c347cceb3797ae603af 33.55MB / 70.03MB 1.2s
2024-06-18T11:34:32Z #7 sha256:193bcbf05ff9ae85ac1a58cacd9c07f8f4297dc648808c347cceb3797ae603af 44.04MB / 70.03MB 1.4s
2024-06-18T11:34:32Z #7 sha256:83c03e4400804660ec377662b61bf20e68e92abd1a635726b631c1803e63f56a 50.33MB / 66.36MB 1.4s
2024-06-18T11:34:32Z #7 sha256:193bcbf05ff9ae85ac1a58cacd9c07f8f4297dc648808c347cceb3797ae603af 50.33MB / 70.03MB 1.6s
2024-06-18T11:34:32Z #7 sha256:83c03e4400804660ec377662b61bf20e68e92abd1a635726b631c1803e63f56a 60.87MB / 66.36MB 1.6s
2024-06-18T11:34:32Z #7 sha256:0b55b0b0b22c736247c0d6dc7b21b2447811e560821da1daacedd4f669556a2e 42.87MB / 198.00MB 1.6s
2024-06-18T11:34:32Z #7 sha256:83c03e4400804660ec377662b61bf20e68e92abd1a635726b631c1803e63f56a 66.36MB / 66.36MB 1.7s
2024-06-18T11:34:32Z #7 sha256:193bcbf05ff9ae85ac1a58cacd9c07f8f4297dc648808c347cceb3797ae603af 61.87MB / 70.03MB 1.9s
2024-06-18T11:34:32Z #7 sha256:0b55b0b0b22c736247c0d6dc7b21b2447811e560821da1daacedd4f669556a2e 54.53MB / 198.00MB 1.9s
2024-06-18T11:34:33Z #7 sha256:193bcbf05ff9ae85ac1a58cacd9c07f8f4297dc648808c347cceb3797ae603af 68.16MB / 70.03MB 2.0s
2024-06-18T11:34:33Z #7 sha256:0b55b0b0b22c736247c0d6dc7b21b2447811e560821da1daacedd4f669556a2e 72.35MB / 198.00MB 2.2s
2024-06-18T11:34:33Z #7 sha256:83c03e4400804660ec377662b61bf20e68e92abd1a635726b631c1803e63f56a 66.36MB / 66.36MB 2.2s done
2024-06-18T11:34:33Z #7 sha256:193bcbf05ff9ae85ac1a58cacd9c07f8f4297dc648808c347cceb3797ae603af 70.03MB / 70.03MB 2.5s done
2024-06-18T11:34:33Z #7 sha256:0b55b0b0b22c736247c0d6dc7b21b2447811e560821da1daacedd4f669556a2e 85.98MB / 198.00MB 2.6s
2024-06-18T11:34:33Z #7 sha256:0b55b0b0b22c736247c0d6dc7b21b2447811e560821da1daacedd4f669556a2e 97.52MB / 198.00MB 2.9s
2024-06-18T11:34:34Z #7 extracting sha256:193bcbf05ff9ae85ac1a58cacd9c07f8f4297dc648808c347cceb3797ae603af
2024-06-18T11:34:34Z #7 sha256:0b55b0b0b22c736247c0d6dc7b21b2447811e560821da1daacedd4f669556a2e 115.34MB / 198.00MB 3.6s
2024-06-18T11:34:35Z #7 sha256:0b55b0b0b22c736247c0d6dc7b21b2447811e560821da1daacedd4f669556a2e 125.83MB / 198.00MB 4.6s
2024-06-18T11:34:36Z #7 sha256:0b55b0b0b22c736247c0d6dc7b21b2447811e560821da1daacedd4f669556a2e 136.56MB / 198.00MB 5.2s
2024-06-18T11:34:36Z #7 sha256:0b55b0b0b22c736247c0d6dc7b21b2447811e560821da1daacedd4f669556a2e 147.85MB / 198.00MB 5.6s
2024-06-18T11:34:37Z #7 sha256:0b55b0b0b22c736247c0d6dc7b21b2447811e560821da1daacedd4f669556a2e 158.33MB / 198.00MB 6.1s
2024-06-18T11:34:37Z #7 sha256:0b55b0b0b22c736247c0d6dc7b21b2447811e560821da1daacedd4f669556a2e 175.11MB / 198.00MB 6.8s
2024-06-18T11:34:38Z #7 sha256:0b55b0b0b22c736247c0d6dc7b21b2447811e560821da1daacedd4f669556a2e 185.82MB / 198.00MB 7.2s
2024-06-18T11:34:38Z #7 sha256:0b55b0b0b22c736247c0d6dc7b21b2447811e560821da1daacedd4f669556a2e 198.00MB / 198.00MB 7.7s
2024-06-18T11:34:39Z #7 extracting sha256:193bcbf05ff9ae85ac1a58cacd9c07f8f4297dc648808c347cceb3797ae603af 5.2s
2024-06-18T11:34:40Z #7 ...
2024-06-18T11:34:40Z 
2024-06-18T11:34:40Z #8 [stage-1 1/4] FROM docker.io/library/centos:7@sha256:be65f488b7764ad3638f236b7b515b3678369a5124c47b8d32916d6487418ea4
2024-06-18T11:34:40Z #8 resolve docker.io/library/centos:7@sha256:be65f488b7764ad3638f236b7b515b3678369a5124c47b8d32916d6487418ea4 0.0s done
2024-06-18T11:34:40Z #8 sha256:dead07b4d8ed7e29e98de0f4504d87e8880d4347859d839686a31da35a3b532f 529B / 529B done
2024-06-18T11:34:40Z #8 sha256:eeb6ee3f44bd0b5103bb561b4c16bcb82328cfe5809ab675bb17ab3a16c517c9 2.75kB / 2.75kB done
2024-06-18T11:34:40Z #8 sha256:be65f488b7764ad3638f236b7b515b3678369a5124c47b8d32916d6487418ea4 1.20kB / 1.20kB done
2024-06-18T11:34:40Z #8 sha256:2d473b07cdd5f0912cd6f1a703352c82b512407db6b05b43f2553732b55df3bc 76.10MB / 76.10MB 5.8s done
2024-06-18T11:34:40Z #8 extracting sha256:2d473b07cdd5f0912cd6f1a703352c82b512407db6b05b43f2553732b55df3bc 3.1s
2024-06-18T11:34:41Z #8 ...
2024-06-18T11:34:41Z 
2024-06-18T11:34:41Z #7 [build 1/4] FROM docker.io/adoptopenjdk/openjdk14:armv7l-centos-jdk-14.0.2_12@sha256:b4688d55ba6fe65b1810a6e5fbc2bed5e29ce977e696b6d2e9dbe092a44f0371
2024-06-18T11:34:41Z #7 sha256:0b55b0b0b22c736247c0d6dc7b21b2447811e560821da1daacedd4f669556a2e 198.00MB / 198.00MB 9.9s done
2024-06-18T11:34:44Z #7 extracting sha256:193bcbf05ff9ae85ac1a58cacd9c07f8f4297dc648808c347cceb3797ae603af 10.4s
2024-06-18T11:34:49Z #7 extracting sha256:193bcbf05ff9ae85ac1a58cacd9c07f8f4297dc648808c347cceb3797ae603af 15.6s
2024-06-18T11:34:50Z #7 ...
2024-06-18T11:34:50Z 
2024-06-18T11:34:50Z #8 [stage-1 1/4] FROM docker.io/library/centos:7@sha256:be65f488b7764ad3638f236b7b515b3678369a5124c47b8d32916d6487418ea4
2024-06-18T11:34:50Z #8 extracting sha256:2d473b07cdd5f0912cd6f1a703352c82b512407db6b05b43f2553732b55df3bc 12.5s
2024-06-18T11:34:50Z #8 ...
2024-06-18T11:34:50Z 
2024-06-18T11:34:50Z #7 [build 1/4] FROM docker.io/adoptopenjdk/openjdk14:armv7l-centos-jdk-14.0.2_12@sha256:b4688d55ba6fe65b1810a6e5fbc2bed5e29ce977e696b6d2e9dbe092a44f0371
2024-06-18T11:34:53Z #7 extracting sha256:193bcbf05ff9ae85ac1a58cacd9c07f8f4297dc648808c347cceb3797ae603af 19.0s done
2024-06-18T11:34:55Z #7 extracting sha256:83c03e4400804660ec377662b61bf20e68e92abd1a635726b631c1803e63f56a
2024-06-18T11:34:59Z #7 ...
2024-06-18T11:34:59Z 
2024-06-18T11:34:59Z #8 [stage-1 1/4] FROM docker.io/library/centos:7@sha256:be65f488b7764ad3638f236b7b515b3678369a5124c47b8d32916d6487418ea4
2024-06-18T11:34:59Z #8 extracting sha256:2d473b07cdd5f0912cd6f1a703352c82b512407db6b05b43f2553732b55df3bc 19.9s done
2024-06-18T11:34:59Z #8 DONE 28.2s
2024-06-18T11:34:59Z 
2024-06-18T11:34:59Z #7 [build 1/4] FROM docker.io/adoptopenjdk/openjdk14:armv7l-centos-jdk-14.0.2_12@sha256:b4688d55ba6fe65b1810a6e5fbc2bed5e29ce977e696b6d2e9dbe092a44f0371
2024-06-18T11:34:59Z #7 ...
2024-06-18T11:34:59Z 
2024-06-18T11:34:59Z #9 [stage-1 2/4] RUN mkdir -p /opt
2024-06-18T11:35:04Z #9 ...
2024-06-18T11:35:04Z 
2024-06-18T11:35:04Z #7 [build 1/4] FROM docker.io/adoptopenjdk/openjdk14:armv7l-centos-jdk-14.0.2_12@sha256:b4688d55ba6fe65b1810a6e5fbc2bed5e29ce977e696b6d2e9dbe092a44f0371
2024-06-18T11:35:04Z #7 extracting sha256:83c03e4400804660ec377662b61bf20e68e92abd1a635726b631c1803e63f56a 8.6s
2024-06-18T11:35:06Z #7 extracting sha256:83c03e4400804660ec377662b61bf20e68e92abd1a635726b631c1803e63f56a 11.1s done
2024-06-18T11:35:08Z #7 extracting sha256:0b55b0b0b22c736247c0d6dc7b21b2447811e560821da1daacedd4f669556a2e
2024-06-18T11:35:11Z #7 ...
2024-06-18T11:35:11Z 
2024-06-18T11:35:11Z #9 [stage-1 2/4] RUN mkdir -p /opt
2024-06-18T11:35:11Z #9 DONE 12.4s
2024-06-18T11:35:11Z 
2024-06-18T11:35:11Z #7 [build 1/4] FROM docker.io/adoptopenjdk/openjdk14:armv7l-centos-jdk-14.0.2_12@sha256:b4688d55ba6fe65b1810a6e5fbc2bed5e29ce977e696b6d2e9dbe092a44f0371
2024-06-18T11:35:13Z #7 extracting sha256:0b55b0b0b22c736247c0d6dc7b21b2447811e560821da1daacedd4f669556a2e 5.1s
2024-06-18T11:35:16Z #7 extracting sha256:0b55b0b0b22c736247c0d6dc7b21b2447811e560821da1daacedd4f669556a2e 7.8s done
2024-06-18T11:35:16Z #7 DONE 45.7s
2024-06-18T11:35:16Z 
2024-06-18T11:35:16Z #10 [build 2/4] RUN /opt/java/openjdk/bin/jlink --module-path=/opt/java/openjdk/jmods --add-modules java.desktop,java.datatransfer,java.logging,java.management,java.naming,java.net.http,java.prefs,java.scripting,java.sql,jdk.management,jdk.unsupported,jdk.jcmd,jdk.crypto.ec,jdk.dynalink --output /opt/songkong/jre
2024-06-18T11:35:17Z #10 0.377 exec /bin/sh: exec format error
2024-06-18T11:35:20Z #10 ERROR: executor failed running [/bin/sh -c /opt/java/openjdk/bin/jlink --module-path=/opt/java/openjdk/jmods --add-modules java.desktop,java.datatransfer,java.logging,java.management,java.naming,java.net.http,java.prefs,java.scripting,java.sql,jdk.management,jdk.unsupported,jdk.jcmd,jdk.crypto.ec,jdk.dynalink --output /opt/songkong/jre]: exit code: 1
2024-06-18T11:35:20Z ------
2024-06-18T11:35:20Z  > [build 2/4] RUN /opt/java/openjdk/bin/jlink --module-path=/opt/java/openjdk/jmods --add-modules java.desktop,java.datatransfer,java.logging,java.management,java.naming,java.net.http,java.prefs,java.scripting,java.sql,jdk.management,jdk.unsupported,jdk.jcmd,jdk.crypto.ec,jdk.dynalink --output /opt/songkong/jre:
2024-06-18T11:35:20Z #10 0.377 exec /bin/sh: exec format error
2024-06-18T11:35:20Z ------
2024-06-18T11:35:20Z ERROR: failed to solve: executor failed running [/bin/sh -c /opt/java/openjdk/bin/jlink --module-path=/opt/java/openjdk/jmods --add-modules java.desktop,java.datatransfer,java.logging,java.management,java.naming,java.net.http,java.prefs,java.scripting,java.sql,jdk.management,jdk.unsupported,jdk.jcmd,jdk.crypto.ec,jdk.dynalink --output /opt/songkong/jre]: exit code: 1
2024-06-18T11:35:20Z Build failed using Buildkit (1)

2

Answers


  1. Context

    Yes it is possible to build an x86 and Arm 32-bit version of your application in DockerHub with multi-arch build support. Your build is failing because you are building an arm/v7 image on x86 hardware, causing an architecture mismatch creating an exec format error. There are two general options available to build multi-architecture images:

    Option 1: Separate Builds on Target Architectures

    • Build the x86 and Arm 32-bit images separately on the architecture they target, and combine the images into one ‘multi-arch image’ via the docker manifest command. Note this requires your build process to have access to x86 and Arm 32-bit machines. You can use separate Dockerfiles for each architecture (as you have today), or combine your app into a single Dockerfile with multi-stage builds supporting both architectures.

    Option 2: Cross-Platform Builds Using Docker Buildx

    • Build the x86 and Arm 32-bit images on the same machine (x86-based), and use docker buildx to create an Arm 32-bit image via the emulation tool QEMU. In this option you can also use separate Dockerfiles for each architecture and combine the images with docker manifest, or a single Dockerfile with a command like docker buildx build --push --platform linux/arm/v7,linux/arm64/v8,linux/amd64 --tag your-username/multiarch-example:buildx-latest .

    To change your current setup the least, you should take Option 2 using your separate Dockerfiles. You’ll need to then modify your DockerHub build step in three ways – install QEMU, use docker buildx for your Arm 32-bit Dockerfile, and combining your x86 and Arm 32-bit Docker images with docker manifest.

    For context, the buildx command was released at DockerCon 2019 via a collaboration between Docker and Arm; being part of the team that created it, I can attest to its usefulness for your use-case and multi-arch builds in general.

    First, however, you need to fix your Dockerfile targeting the Arm architecture as the ‘centos:7’ base image only works on x86. You should replace it with ‘arm32v7/centos:7’ instead.


    DockerHub build edits

    To break it down, your process will look like the following:

    1. Have two separate Dockerfiles, one for each architecture.
    2. Build & push the amd64 image as you are today on DockerHub, which by default uses docker build.
    3. Build & push the arm/v7 image using docker buildx using DockerHub’s custom build hooks.
    4. In a custom push phase for your arm/v7 image, create and push a multi-arch manifest with docker manifest.

    By your Arm 32-bit DockerFile, create a folder called hooks and add two files: build and post_push.

    The build file will look like this (changing slightly to match the correct names and repositories you have configured for your project):

    #!/bin/bash
    
    # Set up buildx. Inspecting ensures buildx is configured correctly and ready, and the final command runs a container to set up QEMU, enabling the Arm emulation for cross-platform building.
    docker buildx create --name mybuilder --use
    docker buildx inspect --bootstrap
    docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
    
    # Build & push the arm/v7 image
    docker buildx build --platform linux/arm/v7 -t username/repository:tag-arm32 -f Dockerfile.arm32 --push .
    

    The post_push file:

    #!/bin/bash
    
    # Create & push the multi-arch manifest combining x86 and arm/v7 images
    docker pull username/repository:tag-amd64
    
    docker manifest create username/repository:tag 
      --amend username/repository:tag-amd64 
      --amend username/repository:tag-arm32
    
    docker manifest push username/repository:tag
    

    When DockerHub executes the automatic build for your Arm 32-bit DockerFile, the build commands will be overwritten with your new buildx commands, and after pushing will pull your already build x86 image and combine it with the Arm 32-bit image.

    Running

    When you want to run this image on x86 and Arm 32-bit hardware, Docker will automatically detect where it is running and pull the correct architecture version. Your standard docker pull username/repository:tag will work fine.


    For those using GitHub Actions, you can refer to this .yml file to see how to use docker buildx in your CI pipelines to build multi-arch images.

    Login or Signup to reply.
  2. At last check, Docker Hub builds do not support multi-platform options. You can follow the progress on that at:

    The most popular method to build multi-platform images these days is to use GitHub Actions. With bitbucket, it looks like they support multi-platform builds in pipelines.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search