-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile-apache
34 lines (28 loc) · 1.05 KB
/
Dockerfile-apache
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
ARG PHP_VERSION=8
FROM ghcr.io/koalaphils/php:${PHP_VERSION}-apache
COPY --link --from=composer/composer /usr/bin/composer /usr/local/bin/composer
COPY opt/php/*.ini $PHP_INI_DIR/conf.d/
RUN composer config --global use-github-api false \
; docker-php-ext-enable \
apcu \
event \
intl \
opcache \
pcntl \
zip \
;
#Install symfony cli
RUN curl -sS https://get.symfony.com/cli/installer | bash -s - --install-dir /usr/local/bin
ENV APACHE_DOCUMENT_ROOT /var/www/html/public
#Apache changes for document root
RUN sed -ri -e "s|/var/www/html|${APACHE_DOCUMENT_ROOT}|g" $APACHE_CONFDIR/sites-available/*.conf
#Copy codes to html folder
ONBUILD COPY app /var/www/html
#Install composer packages
ONBUILD RUN rm -rf vendor && mkdir -p vendor \
; php -d memory_limit=-1 `which composer` install --no-scripts --no-autoloader || exit 1 \
; composer dumpautoload -no --apcu --no-scripts --classmap-authoritative \
; symfony check:requirements || exit 1 \
; symfony version || exit 1 \
;
ONBUILD VOLUME /var/www/html/vendor