-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
31 lines (25 loc) · 1.43 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
FROM php:8.1-fpm-alpine
# The following labels need to be set as part of the docker build process.
# org.opencontainers.image.created
# org.opencontainers.image.revision
LABEL org.opencontainers.image.url="https://laravel.com" \
org.opencontainers.image.documentation="https://github.com/generationtux/php-healthz/blob/master/README.md" \
org.opencontainers.image.source="https://github.com/generationtux/php-healthz/Dockerfile" \
org.opencontainers.image.vendor="Generation Tux <[email protected]>" \
org.opencontainers.image.title="Laravel 6.x" \
org.opencontainers.image.description="PHP built for use with the Laravel/Lumen framework" \
com.generationtux.php.backend="fpm"
USER root
COPY ./docker/installComposer.sh /tmp/installComposer.sh
RUN apk --no-cache --update add bash ca-certificates libpq postgresql-dev curl git curl git mysql-client unzip wget zip postgresql-client \
&& apk add --no-cache --virtual build-dependencies autoconf build-base g++ make \
&& pecl install redis xdebug-3.1.4 \
&& docker-php-ext-install bcmath opcache pdo_mysql pdo_pgsql pcntl \
&& docker-php-ext-enable bcmath opcache redis xdebug \
&& chmod +x /tmp/installComposer.sh \
&& /tmp/installComposer.sh \
&& chown www-data:www-data /usr/local/bin/composer \
&& apk del --purge autoconf build-dependencies g++ make \
&& chown -R www-data:www-data /var/www
WORKDIR /var/www
USER www-data:www-data