-2

Please advise how I can combine this commands in one but I don't need install npm in /opt/app-root folder

RUN chmod -R ug+rwx /opt/app-root
RUN chmod -R ug+rwx /app && npm i 

1 Answers1

0

You've already combined two commands on the second line; you can use the same method to combine the first and second lines.

RUN chmod -R ug+rwx /opt/app-root && chmod -R ug+rwx /app && npm i

You could also just give both arguments to chmod at once though.

RUN chmod -R ug+rwx /opt/app-root /app && npm i
Calum Halpin
  • 1,945
  • 1
  • 10
  • 20