Browse Source

run mock-server in docker

star7th 5 years ago
parent
commit
b918171d9c
1 changed files with 3 additions and 1 deletions
  1. 3 1
      Dockerfile

+ 3 - 1
Dockerfile

@@ -9,4 +9,6 @@ RUN chmod -R 777 /var/www/html/
 RUN mkdir /showdoc_data
 RUN mkdir /showdoc_data/html
 RUN cp -R /var/www/html/ /showdoc_data/
-CMD if [ ! -f "/var/www/html/index.php" ]; then \cp -fr /showdoc_data/html/ /var/www/ ;fi;chmod 777 -R /showdoc_data ;/start.sh
+RUN apk add nodejs
+RUN (cd /showdoc_data/html/mock/ && npm install )
+CMD if [ ! -f "/var/www/html/index.php" ]; then \cp -fr /showdoc_data/html/ /var/www/ ;fi;chmod 777 -R /showdoc_data ;(cd /showdoc_data/html/mock/ && npm run start);/start.sh