Tried an interesting experiment this morning where I built an #amd64/#arm64 #Docker image of Diaspora, which heretofore had always been just an amd64 image. Building this on an arm64 laptop meant that all the amd64 stuff took place in (quite slow) #qemu emulation. Here are the timings for the two builds, which #BuildKit runs in parallel. You can see the commands and architectures, and how long each took to run:

➜  diaspora git:(master) ✗ ./build          
[+] Building 4636.0s (35/35) FINISHED                                                                                                                            
 => [internal] load build definition from Dockerfile                                                                                                        0.0s
 => => transferring dockerfile: 2.65kB                                                                                                                      0.0s
 => [internal] load .dockerignore                                                                                                                           0.0s
 => => transferring context: 96B                                                                                                                            0.0s
 => [linux/arm64 internal] load metadata for docker.io/library/debian:buster-slim                                                                           0.6s
 => [linux/amd64 internal] load metadata for docker.io/library/debian:buster-slim                                                                           0.6s
 => CACHED [linux/amd64 build 1/9] FROM docker.io/library/debian:buster-slim@sha256:544c93597c784cf68dbe492ef35c00de7f4f6a990955c7144a40b20d86a3475f        0.0s
 => => resolve docker.io/library/debian:buster-slim@sha256:544c93597c784cf68dbe492ef35c00de7f4f6a990955c7144a40b20d86a3475f                                 0.0s
 => [internal] load build context                                                                                                                           0.0s
 => => transferring context: 389B                                                                                                                           0.0s
 => CACHED [linux/arm64 build 1/9] FROM docker.io/library/debian:buster-slim@sha256:544c93597c784cf68dbe492ef35c00de7f4f6a990955c7144a40b20d86a3475f        0.0s
 => => resolve docker.io/library/debian:buster-slim@sha256:544c93597c784cf68dbe492ef35c00de7f4f6a990955c7144a40b20d86a3475f                                 0.0s
 => [linux/amd64 stage-1 2/5] RUN adduser --gecos "" --disabled-login --home /home/diaspora diaspora                                                        0.6s
 => [linux/arm64 stage-1 2/5] RUN adduser --gecos "" --disabled-login --home /home/diaspora diaspora                                                        0.2s
 => [linux/arm64 build 2/9] COPY run_as_diaspora.sh /run_as_diaspora.sh                                                                                     0.0s
 => [linux/amd64 build 2/9] COPY run_as_diaspora.sh /run_as_diaspora.sh                                                                                     0.0s
 => [linux/arm64 build 3/9] RUN mkdir -p /usr/share/man/man1     && mkdir -p /usr/share/man/man7                                                            0.1s
 => [linux/amd64 build 3/9] RUN mkdir -p /usr/share/man/man1     && mkdir -p /usr/share/man/man7                                                            0.1s
 => [linux/arm64 build 4/9] RUN apt-get update &&  apt-get install -y -qq  cmake  postgresql-client  build-essential  libgmp-dev  libssl-dev  libcurl4-op  55.2s
 => [linux/amd64 build 4/9] RUN apt-get update &&  apt-get install -y -qq  cmake  postgresql-client  build-essential  libgmp-dev  libssl-dev  libcurl4-o  309.0s
 => [linux/arm64 build 5/9] RUN adduser --gecos "" --disabled-login --home /home/diaspora diaspora                                                          0.2s 
 => [linux/arm64 build 6/9] COPY compose/diaspora.yml.example /diaspora.yml                                                                                 0.0s
 => [linux/arm64 build 7/9] RUN su diaspora -c '/run_as_diaspora.sh'                                                                                      614.1s
 => [linux/amd64 build 5/9] RUN adduser --gecos "" --disabled-login --home /home/diaspora diaspora                                                          0.8s
 => [linux/amd64 build 6/9] COPY compose/diaspora.yml.example /diaspora.yml                                                                                 0.0s
 => [linux/amd64 build 7/9] RUN su diaspora -c '/run_as_diaspora.sh'                                                                                     3765.4s
 => [linux/arm64 build 8/9] RUN rm -rf /home/diaspora/diaspora/.git            /home/diaspora/.gnupg            /home/diaspora/diaspora/vendor/bundle/ruby  0.6s 
 => [linux/arm64 build 9/9] COPY startup.sh startup-lighttpd.sh /home/diaspora/                                                                             0.0s 
 => [linux/arm64 stage-1 3/5] COPY --chown=diaspora:diaspora --from=build /home/diaspora /home/diaspora                                                     3.7s 
 => [linux/arm64 stage-1 4/5] RUN apt-get update &&     apt-get install -yqq         postgresql-client         imagemagick         libyaml-0-2         li  66.6s 
 => [linux/arm64 stage-1 5/5] WORKDIR /home/diaspora                                                                                                        0.1s 
 => [linux/amd64 build 8/9] RUN rm -rf /home/diaspora/diaspora/.git            /home/diaspora/.gnupg            /home/diaspora/diaspora/vendor/bundle/ruby  0.6s 
 => [linux/amd64 build 9/9] COPY startup.sh startup-lighttpd.sh /home/diaspora/                                                                             0.0s 
 => [linux/amd64 stage-1 3/5] COPY --chown=diaspora:diaspora --from=build /home/diaspora /home/diaspora                                                     2.3s 
 => [linux/amd64 stage-1 4/5] RUN apt-get update &&     apt-get install -yqq         postgresql-client         imagemagick         libyaml-0-2         l  121.3s 
 => [linux/amd64 stage-1 5/5] WORKDIR /home/diaspora                                                                                                        0.1s 
 => exporting to image                                                                                                                                    432.9s 
 => => exporting layers                                                                                                                                    22.8s 
 => => exporting manifest sha256:5c3109ef5d47350be207113c3dd037221932180f0f0374cfbec992b13f739968                                                           0.0s 
 => => exporting config sha256:e985585531e41253882bd21211a415dbd1a8d1d074ee71018b49273ab29be3bd                                                             0.0s 
 => => exporting manifest sha256:eea973c274f1be5708a580f9b681ab496877b27a25319e2d21049cd01fc84c5f                                                           0.0s 
 => => exporting config sha256:ce33e251e6f0e332163507d4498e3c7cd4a2c795e17b1aa6f537a035add446f1                                                             0.0s 
 => => exporting manifest list sha256:f299453f87d034fb6d971677e24a41d2bfe07c065affdc6e63cd08306ca6df0c                                                      0.0s
 => => pushing layers                                                                                                                                     408.7s
 => => pushing manifest for docker.io/koehn/diaspora:latest@sha256:f299453f87d034fb6d971677e24a41d2bfe07c065affdc6e63cd08306ca6df0c                         1.3s
 => [auth] koehn/diaspora:pull,push token for registry-1.docker.io                                                                                          0.0s
 => [auth] koehn/diaspora:pull,push token for registry-1.docker.io                                                                                          0.0s
 => [auth] koehn/diaspora:pull,push token for registry-1.docker.io                                                                                          0.0s
The push refers to repository [docker.io/koehn/diaspora]

There are no comments yet.