Dockerfile 992 B

12345678910111213141516171819202122232425262728293031
  1. FROM ubuntu:14.04
  2. # Install packages
  3. RUN apt-get update
  4. RUN apt-get -y install git
  5. RUN apt-get -y install apache2 mysql-server libapache2-mod-php5 imagemagick php5-mysql php5-gd php5-curl php5-imagick
  6. # Modify php.ini to contain the following settings:
  7. # max_execution_time = 200
  8. # post_max_size = 100M
  9. # upload_max_size = 100M
  10. # upload_max_filesize = 20M
  11. # memory_limit = 256M
  12. RUN sed -i -e "s/^max_execution_time\s*=.*/max_execution_time = 200/" \
  13. -e "s/^post_max_size\s*=.*/post_max_size = 100M/" \
  14. -e "s/^upload_max_filesize\s*=.*/upload_max_filesize = 20M\nupload_max_size = 100M/" \
  15. -e "s/^memory_limit\s*=.*/memory_limit = 256M/" /etc/php5/apache2/php.ini
  16. # Link /var/www to /app directory
  17. RUN mkdir -p /app && rm -fr /var/www/html && ln -s /app /var/www/html
  18. WORKDIR /app
  19. # Clone lychee
  20. RUN git clone https://github.com/electerious/Lychee.git .
  21. # Set file permissions
  22. RUN chown -R www-data:www-data /app
  23. RUN chmod -R 777 uploads/ data/
  24. EXPOSE 80
  25. CMD src/commands/start