daily pastebin goal
20%
SHARE
TWEET

Untitled

a guest Jan 20th, 2017 79 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. FROM satevg/gms
  2. EXPOSE 80
  3.  
  4. RUN apt-get update
  5. RUN mkdir -p /home/gms
  6.  
  7. ADD . /home/gms
  8. RUN cp /home/gms/docker/htaccess_additional /home/gms/app/webroot/.htaccess && \
  9.     cp /home/gms/app/config/core.default.php /home/gms/app/config/core.php && \
  10.     cp /home/gms/app/config/database.php.default /home/gms/app/config/database.php
  11. RUN sed -i "153s/.*/Configure::write('Security.salt', 'qidjguvJDBVi83ksiivhBdjvksi2222');/" /home/gms/app/config/core.php
  12.  
  13. RUN mkdir -p /home/gms/app/tmp && \
  14.     mkdir -p /home/gms/app/tmp/cache && \
  15.     mkdir -p /home/gms/app/tmp/logs && \
  16.     mkdir -p /home/gms/app/tmp/sessions && \
  17.     mkdir -p /home/gms/app/tmp/tests
  18.  
  19. RUN a2enmod rewrite
  20. RUN cp /home/gms/docker/gms.conf /etc/apache2/sites-available/
  21. RUN chown root:root /etc/apache2/sites-available/gms.conf
  22. RUN a2ensite gms.conf
  23. RUN service apache2 reload
  24.  
  25. WORKDIR /home/gms
  26.  
  27. RUN chown -R gms:www-data /home/gms && \
  28.     chmod +s+g /home/gms
  29. RUN chmod -R 770 /home/gms/app/tmp
  30.  
  31. RUN /bin/bash -c "/usr/bin/mysqld_safe --skip-grant-tables &" && \
  32.     sleep 10 && \
  33.     mysql -u root mysql -e "UPDATE user SET Password=PASSWORD('change_this_password') where USER='root';" && \
  34.     mysql -u root mysql -e "FLUSH PRIVILEGES;" && \
  35.     /etc/init.d/mysql restart && \
  36.     sleep 10 && \
  37.     (echo "[client]"; echo "user=root"; echo "password=change_this_password") > /root/.my.cnf && \
  38.     mysql -u root -e "CREATE DATABASE gms" && \
  39.     zcat /home/gms/db.sql.gz | mysql -u root gms
  40.  
  41. RUN sed -i "87s/.*/'login' => 'root',/" /home/gms/app/config/database.php && \
  42.     sed -i "88s/.*/'password' => 'change_this_password',/" /home/gms/app/config/database.php && \
  43.     sed -i "89s/.*/'database' => 'gms',/" /home/gms/app/config/database.php
  44.  
  45. CMD service apache2 start && \
  46.     service mysql start && \
  47.     tail -F /var/log/apache2/error.log
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top