crazy-max/ghaction-docker-buildx

What am i doing wrong??

rhastie opened this issue · 1 comments

I keep getting multiple errors in relation to my buildx execution - It's crashing when pulling bionic and I'm not sure what I'm doing wrong... Is this related to the new "ubuntu_latest" image?

I seem to be getting error code 1 when booting buildkit and then several timeout/rpc errors

I'm running the following - Basically I'm using buildx to initially build an AMD64 image, load it to local registry/images, start the container locally, run some CI testing and if those pass then re-run buildx to build the ARMv7 and ARM64 images pushing them to Docker Hub. The first step of building the AMD64 image fails...

      - name: Set up Docker Buildx
        id: buildx
        uses: crazy-max/ghaction-docker-buildx@master
        with:
          buildx-version: latest
          qemu-version: latest

      - name: Available Docker Buildx platforms
        run: echo ${{ steps.buildx.outputs.platforms }}

      - name: Docker Buildx and load x86 image to Docker images
        run: |
          docker buildx build \
            --platform linux/amd64 \
            --tag rhastie/nmos-cpp:dev \
            --build-arg makemt=3 \
            --load \
            --file ./Dockerfile .

Please can anyone advise or assist? I know its me but any guidance would be appreciated...

My log is below with the command chain...

2020-05-20T20:02:47.6016783Z ##[group]Run crazy-max/ghaction-docker-buildx@master
2020-05-20T20:02:47.6017006Z with:
2020-05-20T20:02:47.6017173Z   buildx-version: latest
2020-05-20T20:02:47.6017333Z   qemu-version: latest
2020-05-20T20:02:47.6017485Z env:
2020-05-20T20:02:47.6018764Z   SECRET_GOOGLE_CREDENTIALS: ***
2020-05-20T20:02:47.6018984Z   SECRET_RESULTS_SHEET_ID: ***
2020-05-20T20:02:47.6019154Z   GITHUB_COMMIT: 1b067ed
2020-05-20T20:02:47.6019313Z   GITHUB_BRANCH: dev
2020-05-20T20:02:47.6019484Z   GITHUB_WORKSPACE: /home/runner/work/build-nmos-cpp/build-nmos-cpp
2020-05-20T20:02:47.6019672Z   RUNNER_WORKSPACE: /home/runner/work/build-nmos-cpp
2020-05-20T20:02:47.6019880Z   BUILD_NAME: ubuntu-latest_avahi
2020-05-20T20:02:47.6020041Z   TEST_FAIL: FALSE
2020-05-20T20:02:47.6020215Z   GDRIVE_CREDENTIALS: /home/runner/work/build-nmos-cpp/build-nmos-cpp/gdrive/credentials.json
2020-05-20T20:02:47.6020418Z   HOST_IP_ADDRESS: 10.1.0.4
2020-05-20T20:02:47.6020561Z ##[endgroup]
2020-05-20T20:02:47.8966329Z ✅ Buildx version found: v0.4.1
2020-05-20T20:02:47.8974939Z ⬇� Downloading https://github.com/docker/buildx/releases/download/v0.4.1/buildx-v0.4.1.linux-amd64...
2020-05-20T20:02:48.7224749Z 🔨 Fixing perms...
2020-05-20T20:02:48.7225884Z 📣 Buildx info
2020-05-20T20:02:48.7253663Z [command]/usr/bin/docker buildx version
2020-05-20T20:02:49.2835782Z github.com/docker/buildx v0.4.1 bda4882a65349ca359216b135896bddc1d92461c
2020-05-20T20:02:49.2931300Z ⬇� Downloading qemu-user-static Docker image...
2020-05-20T20:02:49.2953721Z [command]/usr/bin/docker pull -q multiarch/qemu-user-static:latest
2020-05-20T20:02:51.3175798Z docker.io/multiarch/qemu-user-static:latest
2020-05-20T20:02:51.3197597Z 💎 Installing QEMU static binaries...
2020-05-20T20:02:51.3210354Z [command]/usr/bin/docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
2020-05-20T20:02:56.0464101Z Setting /usr/bin/qemu-alpha-static as binfmt interpreter for alpha
2020-05-20T20:02:56.0467324Z Setting /usr/bin/qemu-arm-static as binfmt interpreter for arm
2020-05-20T20:02:56.0474021Z Setting /usr/bin/qemu-armeb-static as binfmt interpreter for armeb
2020-05-20T20:02:56.0479726Z Setting /usr/bin/qemu-sparc-static as binfmt interpreter for sparc
2020-05-20T20:02:56.0492358Z Setting /usr/bin/qemu-sparc32plus-static as binfmt interpreter for sparc32plus
2020-05-20T20:02:56.0505639Z Setting /usr/bin/qemu-sparc64-static as binfmt interpreter for sparc64
2020-05-20T20:02:56.0536104Z Setting /usr/bin/qemu-ppc-static as binfmt interpreter for ppc
2020-05-20T20:02:56.0570633Z Setting /usr/bin/qemu-ppc64-static as binfmt interpreter for ppc64
2020-05-20T20:02:56.0578148Z Setting /usr/bin/qemu-ppc64le-static as binfmt interpreter for ppc64le
2020-05-20T20:02:56.0585433Z Setting /usr/bin/qemu-m68k-static as binfmt interpreter for m68k
2020-05-20T20:02:56.0586388Z Setting /usr/bin/qemu-mips-static as binfmt interpreter for mips
2020-05-20T20:02:56.0587226Z Setting /usr/bin/qemu-mipsel-static as binfmt interpreter for mipsel
2020-05-20T20:02:56.0627556Z Setting /usr/bin/qemu-mipsn32-static as binfmt interpreter for mipsn32
2020-05-20T20:02:56.0632246Z Setting /usr/bin/qemu-mipsn32el-static as binfmt interpreter for mipsn32el
2020-05-20T20:02:56.0633193Z Setting /usr/bin/qemu-mips64-static as binfmt interpreter for mips64
2020-05-20T20:02:56.0663162Z Setting /usr/bin/qemu-mips64el-static as binfmt interpreter for mips64el
2020-05-20T20:02:56.0666676Z Setting /usr/bin/qemu-sh4-static as binfmt interpreter for sh4
2020-05-20T20:02:56.0667980Z Setting /usr/bin/qemu-sh4eb-static as binfmt interpreter for sh4eb
2020-05-20T20:02:56.0669748Z Setting /usr/bin/qemu-s390x-static as binfmt interpreter for s390x
2020-05-20T20:02:56.0670444Z Setting /usr/bin/qemu-aarch64-static as binfmt interpreter for aarch64
2020-05-20T20:02:56.0681545Z Setting /usr/bin/qemu-aarch64_be-static as binfmt interpreter for aarch64_be
2020-05-20T20:02:56.0687877Z Setting /usr/bin/qemu-hppa-static as binfmt interpreter for hppa
2020-05-20T20:02:56.0702351Z Setting /usr/bin/qemu-riscv32-static as binfmt interpreter for riscv32
2020-05-20T20:02:56.0715014Z Setting /usr/bin/qemu-riscv64-static as binfmt interpreter for riscv64
2020-05-20T20:02:56.0726817Z Setting /usr/bin/qemu-xtensa-static as binfmt interpreter for xtensa
2020-05-20T20:02:56.0737895Z Setting /usr/bin/qemu-xtensaeb-static as binfmt interpreter for xtensaeb
2020-05-20T20:02:56.0749417Z Setting /usr/bin/qemu-microblaze-static as binfmt interpreter for microblaze
2020-05-20T20:02:56.0760442Z Setting /usr/bin/qemu-microblazeel-static as binfmt interpreter for microblazeel
2020-05-20T20:02:56.0772336Z Setting /usr/bin/qemu-or1k-static as binfmt interpreter for or1k
2020-05-20T20:02:56.2455502Z 🔨 Creating a new builder instance...
2020-05-20T20:02:56.2473135Z [command]/usr/bin/docker buildx create --name builder-1b067eda288ff81cb32bc275748c8e6df10cd13a --driver docker-container --use
2020-05-20T20:02:56.4258660Z builder-1b067eda288ff81cb32bc275748c8e6df10cd13a
2020-05-20T20:02:56.4279425Z � Booting builder...
2020-05-20T20:02:56.4292161Z [command]/usr/bin/docker buildx inspect --bootstrap
2020-05-20T20:02:56.4866186Z #1 [internal] booting buildkit
2020-05-20T20:02:56.6373523Z #1 pulling image moby/buildkit:buildx-stable-1
2020-05-20T20:02:57.9886098Z #1 pulling image moby/buildkit:buildx-stable-1 1.4s done
2020-05-20T20:02:57.9886713Z #1 creating container buildx_buildkit_builder-1b067eda288ff81cb32bc275748c8e6df10cd13a0
2020-05-20T20:03:02.4287583Z #1 creating container buildx_buildkit_builder-1b067eda288ff81cb32bc275748c8e6df10cd13a0 4.6s done
2020-05-20T20:03:02.4287919Z #1 ERROR: exit code 1
2020-05-20T20:03:02.4288228Z ------
2020-05-20T20:03:02.4288406Z  > [internal] booting buildkit:
2020-05-20T20:03:02.4288690Z ------
2020-05-20T20:03:02.4794902Z error: dial unix /run/buildkit/buildkitd.sock: connect: no such file or directory
2020-05-20T20:03:22.4322824Z Name:   builder-1b067eda288ff81cb32bc275748c8e6df10cd13a
2020-05-20T20:03:22.4323218Z Driver: docker-container
2020-05-20T20:03:22.4323299Z 
2020-05-20T20:03:22.4323465Z Nodes:
2020-05-20T20:03:22.4323853Z Name:     builder-1b067eda288ff81cb32bc275748c8e6df10cd13a0
2020-05-20T20:03:22.4324390Z Endpoint: unix:///var/run/docker.sock
2020-05-20T20:03:22.4324614Z Error:    listing workers: failed to list workers: rpc error: code = Unavailable desc = timed out waiting for server handshake
2020-05-20T20:03:22.4345806Z � Docker info
2020-05-20T20:03:22.4362136Z [command]/usr/bin/docker info
2020-05-20T20:03:22.5417630Z Client:
2020-05-20T20:03:22.5418937Z  Debug Mode: false
2020-05-20T20:03:22.5419278Z  Plugins:
2020-05-20T20:03:22.5419566Z   buildx: Build with BuildKit (Docker Inc., v0.4.1)
2020-05-20T20:03:22.5420323Z 
2020-05-20T20:03:22.5420638Z Server:
2020-05-20T20:03:22.5421002Z  Containers: 1
2020-05-20T20:03:22.5421974Z   Running: 1
2020-05-20T20:03:22.5422259Z   Paused: 0
2020-05-20T20:03:22.5422589Z   Stopped: 0
2020-05-20T20:03:22.5422892Z  Images: 16
2020-05-20T20:03:22.5423169Z  Server Version: 3.0.11+azure
2020-05-20T20:03:22.5423487Z  Storage Driver: overlay2
2020-05-20T20:03:22.5423871Z   Backing Filesystem: <unknown>
2020-05-20T20:03:22.5424163Z   Supports d_type: true
2020-05-20T20:03:22.5424466Z   Native Overlay Diff: false
2020-05-20T20:03:22.5425352Z  Logging Driver: json-file
2020-05-20T20:03:22.5425652Z  Cgroup Driver: cgroupfs
2020-05-20T20:03:22.5425927Z  Plugins:
2020-05-20T20:03:22.5426222Z   Volume: local
2020-05-20T20:03:22.5426539Z   Network: bridge host ipvlan macvlan null overlay
2020-05-20T20:03:22.5427068Z   Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
2020-05-20T20:03:22.5447509Z  Swarm: inactive
2020-05-20T20:03:22.5447773Z  Runtimes: runc
2020-05-20T20:03:22.5447949Z  Default Runtime: runc
2020-05-20T20:03:22.5448559Z  Init Binary: docker-init
2020-05-20T20:03:22.5448752Z  containerd version: 7ad184331fa3e55e52b890ea95e65ba581ae3429
2020-05-20T20:03:22.5448943Z  runc version: 
2020-05-20T20:03:22.5449208Z  init version: fec3683
2020-05-20T20:03:22.5449384Z  Security Options:
2020-05-20T20:03:22.5449550Z   apparmor
2020-05-20T20:03:22.5450048Z   seccomp
2020-05-20T20:03:22.5450223Z    Profile: default
2020-05-20T20:03:22.5450594Z  Kernel Version: 5.3.0-1020-azure
2020-05-20T20:03:22.5450775Z  Operating System: Ubuntu 18.04.4 LTS
2020-05-20T20:03:22.5451871Z  OSType: linux
2020-05-20T20:03:22.5452086Z  Architecture: x86_64
2020-05-20T20:03:22.5770082Z  CPUs: 2
2020-05-20T20:03:22.5770794Z  Total Memory: 6.765GiB
2020-05-20T20:03:22.5771537Z  Name: fv-az55
2020-05-20T20:03:22.5862490Z  ID: CVBH:LCU3:H25P:G3X2:KBBX:D2QY:G3BL:ZI5B:ISCZ:OAZM:BOKC:XTZA
2020-05-20T20:03:22.5863596Z  Docker Root Dir: /var/lib/docker
2020-05-20T20:03:22.5864037Z  Debug Mode: false
2020-05-20T20:03:22.5864716Z  Registry: https://index.docker.io/v1/
2020-05-20T20:03:22.5865132Z  Labels:
2020-05-20T20:03:22.5866372Z  Experimental: false
2020-05-20T20:03:22.5866729Z  Insecure Registries:
2020-05-20T20:03:22.6058938Z   127.0.0.0/8
2020-05-20T20:03:22.6099010Z  Live Restore Enabled: false
2020-05-20T20:03:22.6099305Z 
2020-05-20T20:03:22.6100289Z 🛒 Extracting available platforms...
2020-05-20T20:03:22.7232754Z ##[group]Run echo linux/amd64,linux/arm64,linux/riscv64,linux/ppc64le,linux/s390x,linux/386,linux/arm/v7,linux/arm/v6
2020-05-20T20:03:22.7233026Z �[36;1mecho linux/amd64,linux/arm64,linux/riscv64,linux/ppc64le,linux/s390x,linux/386,linux/arm/v7,linux/arm/v6�[0m
2020-05-20T20:03:22.7299061Z shell: /bin/bash -e {0}
2020-05-20T20:03:22.7299207Z env:
2020-05-20T20:03:22.7300939Z   SECRET_GOOGLE_CREDENTIALS: ***
2020-05-20T20:03:22.7301141Z   SECRET_RESULTS_SHEET_ID: ***
2020-05-20T20:03:22.7301287Z   GITHUB_COMMIT: 1b067ed
2020-05-20T20:03:22.7301422Z   GITHUB_BRANCH: dev
2020-05-20T20:03:22.7301570Z   GITHUB_WORKSPACE: /home/runner/work/build-nmos-cpp/build-nmos-cpp
2020-05-20T20:03:22.7301735Z   RUNNER_WORKSPACE: /home/runner/work/build-nmos-cpp
2020-05-20T20:03:22.7301885Z   BUILD_NAME: ubuntu-latest_avahi
2020-05-20T20:03:22.7302024Z   TEST_FAIL: FALSE
2020-05-20T20:03:22.7302181Z   GDRIVE_CREDENTIALS: /home/runner/work/build-nmos-cpp/build-nmos-cpp/gdrive/credentials.json
2020-05-20T20:03:22.7302399Z   HOST_IP_ADDRESS: 10.1.0.4
2020-05-20T20:03:22.7302670Z ##[endgroup]
2020-05-20T20:03:22.7390603Z linux/amd64,linux/arm64,linux/riscv64,linux/ppc64le,linux/s390x,linux/386,linux/arm/v7,linux/arm/v6
2020-05-20T20:03:22.7420174Z ##[group]Run docker buildx build \
2020-05-20T20:03:22.7420427Z �[36;1mdocker buildx build \�[0m
2020-05-20T20:03:22.7420575Z �[36;1m  --platform linux/amd64 \�[0m
2020-05-20T20:03:22.7420814Z �[36;1m  --tag ***/nmos-cpp:dev \�[0m
2020-05-20T20:03:22.7420958Z �[36;1m  --build-arg makemt=3 \�[0m
2020-05-20T20:03:22.7421100Z �[36;1m  --load \�[0m
2020-05-20T20:03:22.7421238Z �[36;1m  --file ./Dockerfile .�[0m
2020-05-20T20:03:22.7462083Z shell: /bin/bash -e {0}
2020-05-20T20:03:22.7462236Z env:
2020-05-20T20:03:22.7463438Z   SECRET_GOOGLE_CREDENTIALS: ***
2020-05-20T20:03:22.7463635Z   SECRET_RESULTS_SHEET_ID: ***
2020-05-20T20:03:22.7463791Z   GITHUB_COMMIT: 1b067ed
2020-05-20T20:03:22.7463931Z   GITHUB_BRANCH: dev
2020-05-20T20:03:22.7464082Z   GITHUB_WORKSPACE: /home/runner/work/build-nmos-cpp/build-nmos-cpp
2020-05-20T20:03:22.7464739Z   RUNNER_WORKSPACE: /home/runner/work/build-nmos-cpp
2020-05-20T20:03:22.7464902Z   BUILD_NAME: ubuntu-latest_avahi
2020-05-20T20:03:22.7465058Z   TEST_FAIL: FALSE
2020-05-20T20:03:22.7465222Z   GDRIVE_CREDENTIALS: /home/runner/work/build-nmos-cpp/build-nmos-cpp/gdrive/credentials.json
2020-05-20T20:03:22.7465390Z   HOST_IP_ADDRESS: 10.1.0.4
2020-05-20T20:03:22.7465530Z ##[endgroup]
2020-05-20T20:03:23.0784518Z #2 [internal] load .dockerignore
2020-05-20T20:03:23.0785360Z #2 transferring context: 2B done
2020-05-20T20:03:23.0785517Z #2 DONE 0.0s
2020-05-20T20:03:23.0785617Z 
2020-05-20T20:03:23.0785852Z #1 [internal] load build definition from Dockerfile
2020-05-20T20:03:23.0786026Z #1 transferring dockerfile: 6.72kB done
2020-05-20T20:03:23.0786172Z #1 DONE 0.0s
2020-05-20T20:03:23.0786241Z 
2020-05-20T20:03:23.0786390Z #3 [internal] load metadata for docker.io/library/ubuntu:bionic
2020-05-20T20:03:43.0453008Z #3 ERROR: failed to do request: Head https://registry-1.docker.io/v2/library/ubuntu/manifests/bionic: dial tcp: lookup registry-1.docker.io on 168.63.129.16:53: read udp 172.17.0.2:49775->168.63.129.16:53: i/o timeout
2020-05-20T20:03:43.0453365Z 
2020-05-20T20:03:43.0453517Z #14 [internal] load build context
2020-05-20T20:03:43.0453661Z #14 DONE 0.0s
2020-05-20T20:03:43.0453742Z 
2020-05-20T20:03:43.0454101Z #4 [stage1-build  1/16] FROM docker.io/library/ubuntu:bionic
2020-05-20T20:03:43.0454269Z #4 resolve docker.io/library/ubuntu:bionic
2020-05-20T20:04:02.9643123Z #4 resolve docker.io/library/ubuntu:bionic 20.0s done
2020-05-20T20:04:02.9644189Z #4 ERROR: failed to do request: Head https://registry-1.docker.io/v2/library/ubuntu/manifests/bionic: dial tcp: lookup registry-1.docker.io on 168.63.129.16:53: read udp 172.17.0.2:48542->168.63.129.16:53: i/o timeout
2020-05-20T20:04:02.9644551Z ------
2020-05-20T20:04:02.9644701Z  > [internal] load metadata for docker.io/library/ubuntu:bionic:
2020-05-20T20:04:02.9644981Z ------
2020-05-20T20:04:02.9645204Z ------
2020-05-20T20:04:02.9645511Z  > [stage1-build  1/16] FROM docker.io/library/ubuntu:bionic:
2020-05-20T20:04:02.9645785Z ------
2020-05-20T20:04:02.9646436Z failed to solve: rpc error: code = Unknown desc = failed to load cache key: failed to do request: Head https://registry-1.docker.io/v2/library/ubuntu/manifests/bionic: dial tcp: lookup registry-1.docker.io on 168.63.129.16:53: read udp 172.17.0.2:48542->168.63.129.16:53: i/o timeout
2020-05-20T20:04:02.9680482Z ##[error]Process completed with exit code 1.
2020-05-20T20:04:02.9872436Z Post job cleanup.
2020-05-20T20:04:03.0385939Z 🚿 Removing builder instance...
2020-05-20T20:04:03.0446315Z [command]/usr/bin/docker buildx rm builder-1b067eda288ff81cb32bc275748c8e6df10cd13a
2020-05-20T20:04:03.3388445Z Post job cleanup.

Resolved... Don't accidentally flush the IP address from docker0