react-native-docker icon indicating copy to clipboard operation
react-native-docker copied to clipboard

Combine multiple RUN lines into one

Open davidpelfree opened this issue 5 years ago • 1 comments

Each RUN line in Dockerfile generates additional "docker image layer". This is why you see so many lines during "docker pull".

The common way to avoid this is to concatenate multiple bash command using "&&" between them, then break them to multiple lines..

For debugging purposes, make the first command "set -x" which echos the command to the console just before running it. It helps to understand in case of an error, what command caused it.

davidpelfree avatar Mar 23 '20 17:03 davidpelfree

Thanks for the suggestion. I'll have to update the dependencies anyway, will try to change the run commands as well

theanam avatar Jun 18 '20 06:06 theanam