What are advantages of writing script file in Docker?
What are advantages of writing commands inside script file and running that script in Dockerfile rather than directly writing instructions inside Dockerfile ?
One Solution collect form web for “What are advantages of writing script file in Docker?”
I assume you are referring to writing a script like
cmd1 cmd2 cmd3
instead of directly writing
RUN cmd1 RUN cmd2 RUN cmd3
in the Dockerfile. The benefit is that each
RUN command executes a separate script. By writing a single script, you only need to execute one script. This gives both better performance, and allows you to share data via variables from one command to the next.