-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
43 lines (33 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
33
34
35
36
37
38
39
40
41
42
43
FROM php:7.1.3-fpm-alpine
MAINTAINER yakiniku <[email protected]>
# install libraries
RUN apk upgrade --update \
&& apk add \
git \
libmcrypt-dev \
nginx \
zlib-dev \
&& docker-php-ext-install \
mcrypt \
pdo_mysql \
zip \
&& mkdir /run/nginx
# install compose
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \
&& php composer-setup.php --install-dir=/usr/local/bin --filename=composer \
&& php -r "unlink('composer-setup.php');"
COPY lumen/composer.json /tmp/composer.json
COPY lumen/composer.lock /tmp/composer.lock
ENV COMPOSER_ALLOW_SUPERUSER 1
RUN composer install --no-scripts --no-autoloader -d /tmp
COPY lumen /var/www/lumen
WORKDIR /var/www/lumen
RUN mv -n /tmp/vendor ./ \
&& composer dump-autoload
RUN chown www-data:www-data storage/logs \
&& chown -R www-data:www-data storage/framework \
&& cp .env.example .env \
&& php artisan key:generate \
&& mkdir -p /usr/share/nginx \
&& ln -s /var/www/laravel/public /usr/share/nginx/html
EXPOSE 80