forked from symfony/symfony-standard
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile
30 lines (23 loc) · 962 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
FROM php:7.0-apache
MAINTAINER André Rømcke "[email protected]"
ENV COMPOSER_HOME=/root/.composer \
SYMFONY_ENV=prod
# Copy project files into work dir
COPY . /var/www/html
# Get Composer dependancies, create Composer directory (cache and auth files) & Get Composer
RUN apt-get update -q -y \
&& apt-get install -q -y --force-yes --no-install-recommends \
ca-certificates \
curl \
unzip \
git \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir -p $COMPOSER_HOME \
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
RUN composer install -o -n --no-progress --prefer-dist \
&& echo "Clear cache and logs so container starts with clean slate" \
&& rm -Rf var/logs/* var/cache/*/* \
&& echo "Set permissions for www-data, add data folder if you have" \
&& chown -R www-data:www-data var/cache var/logs var/sessions
EXPOSE 80
CMD ["apache2-foreground"]