Dockerfile 839 B

123456789101112131415161718192021222324252627282930
  1. FROM ubuntu:14.04
  2. # Install base packages
  3. RUN apt-get update
  4. RUN apt-get -y install git curl nano wget build-essential
  5. # Install apache and PHP
  6. RUN apt-get -y install apache2 mysql-server libapache2-mod-php5
  7. RUN apt-get -y install php5-mysql php5-gd php5-curl
  8. #RUN sed -i "s/variables_order.*/variables_order = \"EGPCS\"/g" /etc/php5/apache2/php.ini
  9. # Decouple database from container
  10. VOLUME ["/database"]
  11. # Configure the database to use our data dir
  12. RUN sed -i -e "s/^datadir\s*=.*/datadir = \/database/" /etc/mysql/my.cnf
  13. # Link /var/www to /app directory
  14. RUN mkdir -p /app && rm -fr /var/www/html && ln -s /app /var/www/html
  15. WORKDIR /app
  16. # Clone lychee
  17. RUN git clone https://github.com/renfredxh/Lychee.git .
  18. # Set file permissions
  19. RUN chown www-data:www-data /app -R
  20. RUN chmod -R 777 uploads/ data/
  21. EXPOSE 80
  22. CMD scripts/start