The RUN fail but the build continued

I build a Dockerfile for ubunutu and I had the following piece of code :

#Get the Zephyr source code:
RUN west init ~/zephyrproject
RUN cd ~/zephyrproject
RUN west update

that was the output when I use progress=plain :

#16 [13/17] RUN west init ~/zephyrproject
#16 DONE 0.2s

#17 [14/17] RUN cd ~/zephyrproject
#17 DONE 0.2s

actually the script continued and finished and I was thinking it downloaded the code using the west command but when I check zephyrproject there was nothing inside.
I was thinking the build could fail and show and error but this was not the case.

I also get the same behaviour when I use “git clone …” . the script continue even if the command line gve me this error : “fatal: unable to access ‘GitHub - zephyrproject-rtos/zephyr: Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.’: Could not resolve host: github.com

I have no idea what west is, but the build stops only if the last command in the RUN instruction return a non-zero exit code. If it doesn’t, there is no way to tell tht en error happened.

By the way this does nothing at all

Change the workdir using the WORKDIR instruction or put the cd command in the same RUN instruction as the comand that needs to work in that fodler.

west is same as git but it manage mulitple Repo.

you can assume I used “git clone …” and since the git clone fail, the script continue normall.