-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
executable file
·34 lines (25 loc) · 910 Bytes
/
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
FROM php:8.2-rc-fpm
ARG user
ARG uid
RUN apt-get update && apt-get install -y \
apt-utils \
libpq-dev \
libpng-dev \
libzip-dev \
zip \
unzip \
git && docker-php-ext-install pdo_mysql && \
docker-php-ext-install bcmath && \
docker-php-ext-install gd && \
docker-php-ext-install zip && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
COPY ./_docker/app/php.ini /usr/local/etc/php/conf.d/php.ini
ENV COMPOSER_ALLOW_SUPERUSER=1
RUN curl -sS https://getcomposer.org/installer | php -- --filename=composer --install-dir=/usr/local/bin
RUN pecl install xdebug && docker-php-ext-enable xdebug
COPY ./_docker/app/xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
RUN useradd -G www-data,root -u $uid -d /home/$user $user
RUN mkdir -p /home/$user/.composer && chown -R $user:$user /home/$user
WORKDIR /var/www
USER $user