Advertisement
Guest User

Dockerfile - see http://stackoverflow.com/questions/31779802

a guest
Aug 4th, 2015
594
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.46 KB | None | 0 0
  1. FROM alpine:3.2
  2.  
  3. # Add repositories
  4. ADD ./docker/apk/repositories /etc/apk/repositories
  5.  
  6. # Add programs and do some other things
  7. RUN apk --update add \
  8. curl \
  9. git \
  10. mysql \
  11. mysql-client \
  12. nginx \
  13. php-curl \
  14. php-fpm \
  15. php-mysqli \
  16. php-zlib \
  17. pwgen \
  18. && \
  19. rm -rf /var/cache/apk/* \
  20. && \
  21. mysql_install_db --user=mysql && \
  22. cp /usr/share/mysql/mysql.server /etc/init.d/mysql && \
  23. chmod +x /etc/init.d/mysql \
  24. && \
  25. rm -rf /var/www && \
  26. rm -rf /var/run && \
  27. mkdir /etc/nginx/sites-available /etc/nginx/sites-enabled
  28.  
  29. # Copy over our local environment files
  30. COPY ./docker/nginx/default /etc/nginx/sites-available/default
  31. COPY ./docker/nginx/nginx.conf /etc/nginx/nginx.conf
  32. COPY ./docker/setup /setup
  33. COPY ./docker/wordpress /var/www
  34.  
  35. # Final run chain
  36. RUN ln -s /etc/nginx/sites-available/default /etc/nginx/sites-enabled/default && \
  37. ln -s /run /var/run && \
  38. git clone -b 4.2.3 --depth 1 https://github.com/wordpress/wordpress.git /var/www/wordpress && \
  39. mv /var/www/wordpress/wp-content /var/www/wp-content && \
  40. rm /var/www/wp-content/plugins/hello.php && \
  41. mkdir /var/www/wp-content/plugins/my-plugin-directory /run/nginx /run/php-fpm && \
  42. chown -R nginx:nginx /var/www && \
  43. chmod 700 /setup && \
  44. sync
  45.  
  46. # Mount directories
  47. VOLUME ["/var/www", "/var/lib/mysql"]
  48.  
  49. # Expose ports
  50. EXPOSE 80
  51.  
  52. # ENTER YE WHO DARE
  53. ENTRYPOINT ["/setup"]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement