-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
37 lines (25 loc) · 919 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
36
37
FROM bluestreak/php:latest
WORKDIR /var/www
RUN [ ! -d pub ] && mkdir pub
RUN [ ! -d var ] && mkdir var
RUN [ ! -d app/etc ] && mkdir -p app/etc
COPY composer.json composer.lock auth.json ./
COPY .docker/composer-cache .docker/composer-cache
RUN chsh -s /bin/bash www-data \
&& chown -R www-data:www-data ./
RUN su - www-data -c "COMPOSER_CACHE_DIR=.docker/composer-cache composer update --no-interaction --prefer-dist -o"
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash -
RUN apt-get install nodejs
RUN npm i -g m2-builder workbox-cli@beta
COPY app app
RUN find . -user root | xargs chown www-data:www-data \
&& chmod +x bin/magento
RUN chmod +x bin/magento
RUN chmod -R 777 /var/www/var
RUN chmod -R 777 /var/www/generated
VOLUME ["/var/www/app/etc"]
VOLUME ["/var/www/pub"]
VOLUME ["/var/www/setup"]
VOLUME ["/var/www/var"]
ENTRYPOINT ["/usr/local/bin/docker-configure"]
CMD ["php-fpm"]