Docker Community Forums

Share and learn in the Docker community.

Build images with BuildKit returns unexpected EOF

I am having trouble using BuildKit. I am using Ubuntu 18.04 with Docker version 19.03.8, build afacb8b7f0


FROM ubuntu:18.04
RUN echo hello
RUN echo world


docker build .


[+] Building 0.4s (4/6)                                               
 => [internal] load build definition from Dockerfile             0.0s
 => => transferring dockerfile: 37B                              0.0s
 => [internal] load .dockerignore                                0.0s
 => => transferring context: 2B                                  0.0s
 => [internal] load metadata for  0.0s
 => CACHED [1/3] FROM             0.0s
 => [2/3] RUN echo hello                                         0.4s
 => => # hello                                                       
unexpected EOF

The seconds echo command is not executed. The same Dockerfile works fine without BuildKit.

Just for anyone’s interest, I solved the issue by restarting the docker deamon…

sudo service docker restart