forked from rpiambulance/website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
32 lines (28 loc) · 1.06 KB
/
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
FROM php:7.2-apache
ARG build_env=production
COPY . /var/www/html
WORKDIR /var/www/html
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates \
curl \
git \
sudo \
unzip \
zip \
&& curl -sL https://deb.nodesource.com/setup_10.x | bash - \
&& apt-get install -y nodejs \
&& npm install -g bower \
&& docker-php-ext-install pdo pdo_mysql \
&& php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \
&& php composer-setup.php \
&& php -r "unlink('composer-setup.php');" \
&& mv "${PHP_INI_DIR}/php.ini-${build_env}" "${PHP_INI_DIR}/php.ini" \
&& chmod +x composer.phar \
&& mv composer.phar /usr/local/bin/composer \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir -p /var/www/.config \
&& chown www-data:www-data /var/www/ \
&& chown www-data:www-data /var/www/.config \
&& sudo -u www-data /bin/bash -c "bower install --production" \
&& sudo -u www-data /bin/bash -c "composer install --no-dev --optimize-autoloader"