I understand that each RUN command creates a layer. Suppose I have the following RUN commands:
RUN python -m pip install --upgrade pip
RUN python -m pip install --upgrade setuptools
RUN pip install -r requirements.txt
I wish to run all the command in one run command. Is the below OK to use?
RUN python -m pip install --upgrade pip; python -m pip install --upgrade setuptools; pip install -r requirements.txt
If I use the following, then it gives me an error "The token '&&' is not a valid statement separator in this version.":
RUN python -m pip install --upgrade pip && python -m pip install --upgrade setuptools && pip install -r requirements.txt