How does RUN write line break code in dockerfile

  docker, question

For example, you want to perform this

tee /root/.pip/pip.conf <<-'EOF'
 index-url =

How to write in dockerfile, direct writing is not acceptable. If it is written in the following form, it will become a single line and cannot meet the original format requirements

RUN tee /root/.pip/pip.conf <<-'EOF' \
 [global] \
 index-url = \

Please advise

Use line breaks\n

echo "[global]\nindex-url =\n" > /root/.pip/pip.conf