You can run a script or a more complex parameter for the RUN. Here is an example from a Docker file that I downloaded to view earlier:
RUN cd /opt && unzip treeio.zip && mv treeio-master treeio && \ rm -f treeio.zip && cd treeio && pip install -r requirements.pip
Due to the use of '& &', it will only get to the final 'pip install' command if all previous commands succeed.
In fact, since each RUN creates a new commit and (currently) AUFS level, if you have too many commands in the Docker file, you will use limits, so combining RUN (when the file is stable) can be a very useful thing.
Alister Bulman Dec 17 '13 at 11:13 2013-12-17 11:13
source share