You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 line
599 B

4 年之前
  1. FROM webdevops/php-nginx:7.4-alpine
  2. COPY ./ /var/www/html/
  3. RUN mkdir -p /showdoc_data/html
  4. RUN cp -R /var/www/html/ /showdoc_data/
  5. RUN rm -rf /app && ln -s /var/www/html /app
  6. RUN echo "<?php echo file_get_contents('index.html'); ?>" > /var/www/html/web/index.php
  7. RUN apk update
  8. RUN apk add --update nodejs nodejs-npm
  9. RUN mv /showdoc_data/html/mock/ /showdoc_data/mock
  10. RUN (cd /showdoc_data/mock/ && npm install )
  11. CMD if [ ! -f "/var/www/html/index.php" ]; then \cp -fr /showdoc_data/html/ /var/www/ ;fi;chmod 777 -R /var/www/ ;(sleep 60 && cd /showdoc_data/mock/ && npm run start) & supervisord