This message was deleted.
# rancher-desktop
a
This message was deleted.
p
When you say cause a failure, does it have any particular error messages? And are you using the moby or containerd backend? I'm thinking of https://github.com/moby/buildkit/issues/4108 which seems to cause issues when there's a
RUN
in a
Dockerfile
(which you have here), with an error about
/sys/fs/cgroup/openrc
in there somewhere (which we're still looking into).
p
Maybe I wasn’t clear, I’m actively trying to cause an error if you try to build a new image FROM my base image using the ‘ONBUILD RUN’ keyword
p
Ah, okay. Sorry about misreading. That does seem to work for me: (using the same
ONBUILD
you have above):
Copy code
=> [internal] load .dockerignore                                                                                                                                                                                                                                                                                0.0s
 => => transferring context: 2B                                                                                                                                                                                                                                                                                  0.0s
 => [internal] load build definition from Dockerfile                                                                                                                                                                                                                                                             0.0s
 => => transferring dockerfile: 56B                                                                                                                                                                                                                                                                              0.0s
 => [internal] load metadata for <http://docker.io/library/base:latest|docker.io/library/base:latest>                                                                                                                                                                                                                                                   0.0s
 => CACHED [1/2] FROM <http://docker.io/library/base|docker.io/library/base>                                                                                                                                                                                                                                                                     0.0s
 => ERROR [2/2] RUN exit 1                                                                                                                                                                                                                                                                                       0.2s
------
 > [2/2] RUN exit 1:
------
Dockerfile:1
--------------------
   1 | >>> FROM base
   2 |     RUN true
   3 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c exit 1" did not complete successfully: exit code: 1
FWIW,
docker inspect base --format '{{ json .Config.OnBuild }}'
shows
["RUN exit 1"]