Build error on a laravel project

I have the following conceptual missunderstanding:

In docker file, when we have for example:
FROM ubuntu:21.04
RUN apt-get update && apt-get install gnupg curl …etc., the RUN commands run in the ubuntu container? I mean the ubuntu is runnning when the RUN commands are issued?

I ask this because I have the error from the attached image. It looks like it cannot run the commands.

Do you have any ideea?

Thanks in advance!