Cloudkul Support

How to add multiple lines using dockerfile ?

To add multiple lines in a file in docker container using dockerfile, add the following command in dockerfile:

RUN echo 'this is line1\n\
          this is line2\n\
          this is line3\n'\
          >> /path/to/file

 

Is this article is helpful?

People like and 1 people dislike.

If result is not found or irrelevant, Please contact us.

Submit your request