moby/buildkit

if crun is used, an error occurs when building the image: unrecognized option --keep

ilfat12 opened this issue · 2 comments

buildkit version is 0.12.5

Since crun does not have the --keep option and you are using it in the last version, the following error occurs when building images:

admin@server ~/test $ docker buildx build .
[+] Building 0.4s (5/5) FINISHED                                                                                                                                                                      docker:default
 => [internal] load build definition from Dockerfile                                                                                                                                                            0.0s
 => => transferring dockerfile: 65B                                                                                                                                                                             0.0s
 => [internal] load metadata for docker.io/library/alpine:latest                                                                                                                                                0.0s
 => [internal] load .dockerignore                                                                                                                                                                               0.0s
 => => transferring context: 2B                                                                                                                                                                                 0.0s
 => CACHED [1/2] FROM docker.io/library/alpine:latest                                                                                                                                                           0.0s
 => ERROR [2/2] RUN apk add git                                                                                                                                                                                 0.3s
------
 > [2/2] RUN apk add git:
0.078 run: unrecognized option '--keep'
0.078 Try `run --help' or `run --usage' for more information.
------
Dockerfile:2
--------------------
   1 |     FROM alpine
   2 | >>> RUN apk add git
   3 |
--------------------
ERROR: failed to solve: process "/bin/sh -c apk add git" did not complete successfully: exit code: 64
admin@server ~/test $ cat Dockerfile
FROM alpine
RUN apk add git

Can you report it to crun and maybe they can add the flag?

Can you report it to crun

containers/crun#1428