diff --git a/Dockerfile2 b/Dockerfile2
index 2f2b0c1a3e3076691d339387590408fddd1cb308..50ddb1196edddbbe0e6ed97108471c954edd52d5 100644
--- a/Dockerfile2
+++ b/Dockerfile2
@@ -22,7 +22,8 @@ RUN R --version
 #COPY ./scripts/packages_to_install.csv .
 COPY ./scripts /opt/scripts
 
-RUN Rscript /opt/scripts/install_r_packages.R
+RUN cd /opt/scripts/ \
+ && Rscript /opt/scripts/install_r_packages.R
 
 #Install shiny server
 #RUN apt-get update \