-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
40 lines (28 loc) · 1.01 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
FROM php:7.3-alpine AS build-env
LABEL owner="Alex Pariona"
LABEL maintainer="[email protected]"
WORKDIR /app
RUN apk update && apk add --no-cache \
openssl \
git \
unzip && \
curl --silent --show-error -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
COPY . .
RUN cp -f docker/.htaccess . && \
cp -f docker/settings.php src/ && \
rm -rf docker
RUN composer install --no-interaction --no-dev --optimize-autoloader --ignore-platform-reqs && \
composer dump-autoload --optimize --no-dev --classmap-authoritative && \
find vendor/ -type f ! -name "*.php" -delete
FROM php:7.3-apache
ENV API_TOKEN wolsnut4
RUN apt-get update && \
docker-php-ext-configure opcache --enable-opcache && \
docker-php-ext-install opcache && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Copy configuration
COPY docker/config/opcache.ini $PHP_INI_DIR/conf.d/
RUN a2enmod rewrite
COPY --from=build-env /app /var/www/html
VOLUME /var/www/html/logs