-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile82
39 lines (33 loc) · 1.58 KB
/
Dockerfile82
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
ARG ALPINE_VERSION
FROM alpine:${ALPINE_VERSION}
ARG COMPOSER_VERSION
ARG XDEBUG_MODE
WORKDIR /app
LABEL org.opencontainers.image.title 'PHP'
LABEL org.opencontainers.image.description 'PHP with XDebug and Composer'
LABEL org.opencontainers.image.authors 'Richard Boldiš <richard@boldis.dev>'
LABEL org.opencontainers.image.source https://github.com/Richardds/docker-php
# Install and configure PHP and its extensions
RUN apk add --no-cache --update php82 \
php82-bcmath \
php82-curl \
php82-dom \
php82-iconv \
php82-mbstring \
php82-openssl \
php82-pecl-xdebug \
php82-phar \
php82-simplexml \
php82-xml \
php82-xmlreader \
php82-xmlwriter \
php82-zip \
&& rm -rf /var/cache/apk/* \
&& if [ ! -f /usr/bin/php ]; then ln -s /usr/bin/php82 /usr/bin/php; fi \
&& echo 'zend_extension=xdebug.so' > /etc/php82/conf.d/50_xdebug.ini \
&& echo "xdebug.mode=${XDEBUG_MODE}" >> /etc/php82/conf.d/50_xdebug.ini
# Install composer
RUN wget https://raw.githubusercontent.com/composer/getcomposer.org/76a7060ccb93902cd7576b67264ad91c8a2700e2/web/installer \
-O - -q | php -- --version=${COMPOSER_VERSION} \
--install-dir=/usr/local/bin \
--filename=composer