-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
26 lines (24 loc) · 660 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
FROM weinstein/composer:latest as php-builder
COPY composer* ./
RUN php -f composer.phar install \
--no-autoloader \
--no-scripts \
--no-interaction
COPY . .
RUN php -f composer.phar install --no-dev -o
FROM node:14 as js-builder
WORKDIR /app
COPY package*.json /app/
RUN npm install
COPY . .
RUN npm run build
FROM weinstein/webserver:latest
COPY . /var/www
COPY --from=php-builder /var/www/public/vendor /var/www/vendor
COPY --from=js-builder /app/public/js /var/www/public/js
USER root
RUN chown -R www-data /var/www && \
chgrp -R 0 /var/www && \
chmod -R g+rw /var/www/storage && \
chmod -R u+rw /var/www/storage
WORKDIR /var/www