-
-
Notifications
You must be signed in to change notification settings - Fork 34
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (26 loc) · 674 Bytes
/
Copy pathDockerfile
File metadata and controls
32 lines (26 loc) · 674 Bytes
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
FROM php:8.4-fpm
# Install dependencies
RUN apt-get update && apt-get install -y \
libfreetype6-dev \
libjpeg62-turbo-dev \
libpng-dev \
libzip-dev \
zip \
unzip \
git \
curl \
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
&& docker-php-ext-install -j$(nproc) gd \
&& docker-php-ext-install pdo pdo_mysql zip
# Install Xdebug
RUN pecl install xdebug \
&& docker-php-ext-enable xdebug
# Install Composer
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
# Set working directory
COPY . /var/www
WORKDIR /var/www
# Expose port 9003 for Xdebug
EXPOSE 9003
# Start PHP-FPM server
CMD ["php-fpm"]