Advertisement
mrbits

Untitled

Jun 15th, 2017
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.29 KB | None | 0 0
  1. FROM node:boron-alpine
  2.  
  3. RUN mkdir -p /app
  4. WORKDIR /app
  5.  
  6. COPY package.json /app/
  7. RUN npm install
  8.  
  9. COPY . /app
  10.  
  11. RUN npm run build
  12.  
  13. RUN apk update && apk upgrade && \
  14.  
  15. apk add apache2 libxml2-dev apache2-utils && \
  16. mkdir /web/ && chown -R apache.www-data /web && \
  17.  
  18. sed -i 's#^DocumentRoot ".*#DocumentRoot "/web/html"#g' /etc/apache2/httpd.conf && \
  19. sed -i 's#AllowOverride none#AllowOverride All#' /etc/apache2/httpd.conf && \
  20. sed -i 's#^ServerRoot .*#ServerRoot /web#g' /etc/apache2/httpd.conf && \
  21. sed -i 's/^#ServerName.*/ServerName webproxy/' /etc/apache2/httpd.conf && \
  22. sed -i 's#^IncludeOptional /etc/apache2/conf#IncludeOptional /web/config/conf#g' /etc/apache2/httpd.conf && \
  23. sed -i 's#PidFile "/run/.*#Pidfile "/web/run/httpd.pid"#g' /etc/apache2/conf.d/mpm.conf && \
  24. sed -i 's#Directory "/var/www/localhost/htdocs.*#Directory "/web/html" >#g' /etc/apache2/httpd.conf && \
  25. sed -i 's#Directory "/var/www/localhost/cgi-bin.*#Directory "/web/cgi-bin" >#g' /etc/apache2/httpd.conf && \
  26.  
  27. sed -i 's#/var/log/apache2/#/web/logs/#g' /etc/logrotate.d/apache2 && \
  28. sed -i 's/Options Indexes/Options /g' /etc/apache2/httpd.conf && \
  29.  
  30. rm -rf /var/cache/apk/*
  31.  
  32. RUN cp -r /app/dist/* /web/
  33.  
  34. EXPOSE 80
  35.  
  36. CMD ["httpd", "-D", "FOREGROUND;"]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement