Advertisement
Guest User

Untitled

a guest
Dec 29th, 2016
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.34 KB | None | 0 0
  1. FROM ubuntu:xenial
  2. MAINTAINER Some Guy <someguy@domain.com>
  3.  
  4. RUN apt-get update && apt-get install -y
  5. apache2
  6. vim
  7. php
  8. php-common
  9. php-cli
  10. php-curl
  11. php-mysql
  12. php-mongodb
  13. libapache2-mod-php
  14. php-gd
  15.  
  16. RUN mkdir -p /var/www/symfony.local/public_html
  17. RUN chown -R $USER:$USER /var/www/symfony.local/public_html
  18.  
  19. RUN chmod -R 755 /var/www
  20.  
  21. COPY config/php/php.ini /usr/local/etc/php/
  22. COPY config/apache/sites-available/*.conf /etc/apache2/sites-available/
  23.  
  24. RUN a2enmod rewrite
  25.  
  26. RUN a2dissite 000-default.conf
  27. RUN a2ensite symfony.local.conf
  28.  
  29. EXPOSE 80
  30.  
  31. CMD ["/usr/sbin/apache2ctl", "-D", "FOREGROUND"]
  32.  
  33. FROM mysql:5.7
  34. MAINTAINER Some Guy <someguy@domain.com>
  35.  
  36. # Set the root users password
  37. ENV MYSQL_ROOT_PASSWORD password
  38.  
  39. # Copy over the DB dump to be run upon creation
  40. COPY sql/ /docker-entrypoint-initdb.d
  41.  
  42. # Copy over the custom mysql config file
  43. COPY config/ /etc/mysql/conf.d
  44.  
  45. EXPOSE 3306
  46.  
  47. docker run --name mongo -d mongo #Im making use of the official Mongo image
  48. docker run --name mysql -v /usr/local/var/mysql:/var/lib/mysql -d someguy/local:mysql
  49. docker run --name web -d -p 80:80 --link mysql:mysql --link mongo:mongo -v ~/Sites/symfony.local/:/var/www/symfony.local/public_html/ someguy/local:web
  50.  
  51. parameters:
  52. database_host: mysql
  53. database_port: 3306
  54. database_name: gorilla
  55. database_user: root
  56. database_password: password
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement