linuxdockerjenkinsamazon-ec2dockerfile

DOCKER ERROR: failed to solve: frontend grpc server closed unexpectedly


I am using docker on an EC2 linux/arm64 instance Since my last docker upgrade, I have been getting the following error

DOCKER_BUILDKIT=1 docker build --ssh default -f
../containers/api/Dockerfile . -t api-test:latest
--target setup
#0 building with "default" instance using docker driver

#1 [internal] load build definition from Dockerfile
#1 transferring dockerfile: 493B done
#1 DONE 0.0s

#2 resolve image config for docker.io/docker/dockerfile:1.0.0-experimental
#2 DONE 0.6s

#3 docker-image://docker.io/docker/dockerfile:1.0.0-experimental@sha256:d2d402b6fa1dae752f8c688d72066a912d7042cc1727213f7990cdb57f60df0c
#3 CACHED Dockerfile:1 1 | >>> # syntax=docker/dockerfile:1.0.0-experimental 2 | 3 | # Build stage
ERROR: failed to solve: frontend grpc server closed unexpectedly make:
*** [run-tests] Error 1 Build step 'Execute shell' marked build as failure

The docker version

Client:

Server: Engine:

On my M2 mac, it works fine with a newer version of docker

Docker version 26.1.4, build 5650f9b.


Solution

  • The issue was with the versions of containerd and runc.

    I updated the two to resolve the issue.

    More details: https://github.com/moby/buildkit/issues/5117