lychee/Dockerfile

34 lines
1.1 KiB
Docker
Raw Normal View History

2014-10-07 18:25:18 +00:00
FROM ubuntu:14.04
# Install base packages
RUN apt-get update
RUN apt-get -y install git curl nano wget build-essential
2014-10-27 20:32:08 +00:00
# Install Apache, PHP, MySQL, and ImageMagick
RUN apt-get -y install apache2 mysql-server libapache2-mod-php5 imagemagick
RUN apt-get -y install php5-mysql php5-gd php5-curl php5-imagick
# Modify php.ini to contain the following settings:
# max_execution_time = 200
# post_max_size = 100M
# upload_max_size = 100M
# upload_max_filesize = 20M
# memory_limit = 256M
RUN sed -i -e "s/^max_execution_time\s*=.*/max_execution_time = 200/" \
-e "s/^post_max_size\s*=.*/post_max_size = 100M/" \
-e "s/^upload_max_filesize\s*=.*/upload_max_filesize = 20M\nupload_max_size = 100M/" \
-e "s/^memory_limit\s*=.*/memory_limit = 256M/" /etc/php5/apache2/php.ini
2014-10-07 18:25:18 +00:00
# Link /var/www to /app directory
RUN mkdir -p /app && rm -fr /var/www/html && ln -s /app /var/www/html
WORKDIR /app
# Clone lychee
2014-10-27 20:32:08 +00:00
RUN git clone https://github.com/electerious/Lychee.git .
2014-10-07 18:25:18 +00:00
# Set file permissions
2014-11-04 08:36:29 +00:00
RUN chown -R www-data:www-data /app
2014-10-07 18:25:18 +00:00
RUN chmod -R 777 uploads/ data/
EXPOSE 80
2014-10-27 21:16:54 +00:00
CMD src/commands/start