-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
35 lines (24 loc) · 975 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
FROM php:7-apache
MAINTAINER Raymond Piller <[email protected]>
# Apache & PHP configuration
RUN a2enmod rewrite
ADD docker/apache/vhost.conf /etc/apache2/sites-enabled/000-default.conf
ADD docker/php/php.ini /usr/local/etc/php/php.ini
# Install OS Requirements && PHP Core Extensions
RUN requirements="wget git libfreetype6-dev libjpeg62-turbo-dev libpng-dev" \
&& apt-get update && apt-get install -y $requirements \
&& rm -rf /var/lib/apt/lists/* \
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-install -j$(nproc) gd
# Add the application
WORKDIR /var/www
ADD docker docker
ADD html html
RUN chmod +x /var/www/docker/apache/run.sh \
&& chmod +x /var/www/docker/apache/start_safe_perms
# Cleanup
RUN chown -R www-data /var/www \
&& apt-get remove -y wget git \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get purge --auto-remove -y
CMD ["/var/www/docker/apache/run.sh"]