Total newbie question, but why is it necessary to put RUN cd /tmp && yarn on a single line?
Jan Aagaard

Jan Aagaard this is because each RUN statement is a new shell execution, so the directory context is not maintained. In general, packing multiple instructions on a single RUN, when possible, reduces the overhead due to the creation of a new Docker layer (however, it seems to me that the overhead is less evident in recent Docker versions).

Like what you read? Give Martino Fornasa a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.