forked from rushi/swiftmailer-spoolreader
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (20 loc) · 821 Bytes
/
Copy pathDockerfile
File metadata and controls
29 lines (20 loc) · 821 Bytes
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
# Stage 1: Builder
FROM debian:buster-slim as builder
SHELL ["/bin/bash", "-c"]
WORKDIR /app
ENV DEBIAN_FRONTEND=noninteractive
ENV COMPOSER_ALLOW_SUPERUSER=1
RUN apt-get update && apt-get install -y curl gnupg tzdata unzip git
RUN curl -sL https://deb.nodesource.com/setup_12.x | bash \
&& apt-get install -y nodejs php php-fpm php-zip nginx
COPY . .
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
RUN composer update && composer install
# Stage 2: Final Image
FROM php:7.4-apache
COPY --from=builder /app/config /var/www/config
COPY --from=builder /app/web /var/www/html/
COPY --from=builder /app/node_modules /var/www/node_modules
COPY --from=builder /app/src /var/www/src
COPY --from=builder /app/vendor /var/www/vendor
CMD ["apache2-foreground"]