I just found this introduction to heredoc in Dockerfiles, and it’s pretty cool. It won’t allow you to do anything that you couldn’t do in Dockerfiles before, but it makes the syntax much better and easier to work with. The main idea is that you won’t need to add && \ at the end of each command inside of RUN. Give it a try.