Updated Docker (@renfredxh, #252)
This commit is contained in:
parent
b08f5735e3
commit
e461ff07bc
26
Dockerfile
26
Dockerfile
@ -4,27 +4,31 @@ FROM ubuntu:14.04
|
|||||||
RUN apt-get update
|
RUN apt-get update
|
||||||
RUN apt-get -y install git curl nano wget build-essential
|
RUN apt-get -y install git curl nano wget build-essential
|
||||||
|
|
||||||
# Install apache and PHP
|
# Install Apache, PHP, MySQL, and ImageMagick
|
||||||
RUN apt-get -y install apache2 mysql-server libapache2-mod-php5
|
RUN apt-get -y install apache2 mysql-server libapache2-mod-php5 imagemagick
|
||||||
RUN apt-get -y install php5-mysql php5-gd php5-curl
|
RUN apt-get -y install php5-mysql php5-gd php5-curl php5-imagick
|
||||||
#RUN sed -i "s/variables_order.*/variables_order = \"EGPCS\"/g" /etc/php5/apache2/php.ini
|
|
||||||
|
|
||||||
# Decouple database from container
|
# Modify php.ini to contain the following settings:
|
||||||
VOLUME ["/database"]
|
# max_execution_time = 200
|
||||||
|
# post_max_size = 100M
|
||||||
# Configure the database to use our data dir
|
# upload_max_size = 100M
|
||||||
RUN sed -i -e "s/^datadir\s*=.*/datadir = \/database/" /etc/mysql/my.cnf
|
# 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
|
||||||
|
|
||||||
# Link /var/www to /app directory
|
# Link /var/www to /app directory
|
||||||
RUN mkdir -p /app && rm -fr /var/www/html && ln -s /app /var/www/html
|
RUN mkdir -p /app && rm -fr /var/www/html && ln -s /app /var/www/html
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# Clone lychee
|
# Clone lychee
|
||||||
RUN git clone https://github.com/renfredxh/Lychee.git .
|
RUN git clone https://github.com/electerious/Lychee.git .
|
||||||
|
|
||||||
# Set file permissions
|
# Set file permissions
|
||||||
RUN chown www-data:www-data /app -R
|
RUN chown www-data:www-data /app -R
|
||||||
RUN chmod -R 777 uploads/ data/
|
RUN chmod -R 777 uploads/ data/
|
||||||
|
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
CMD src/commands/start
|
CMD scripts/start
|
Loading…
Reference in New Issue
Block a user