The command ONBUILD RUN don't look at the WORKDIR, and it seems the WORKDIR $ROOT can't make it.
ONBUILD RUN
WORKDIR
WORKDIR $ROOT