-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (22 loc) · 666 Bytes
/
Copy pathDockerfile
File metadata and controls
29 lines (22 loc) · 666 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
# Use the official PHP image with PHP-FPM
FROM php:8.4-fpm
# Install necessary PHP extensions and tools
RUN apt-get update && apt-get install -y \
zip \
unzip \
git \
libmemcached-dev \
zlib1g-dev \
&& pecl install memcached \
&& docker-php-ext-enable memcached
# Install Composer
RUN php -r "readfile('https://getcomposer.org/installer');" | php -- --install-dir=/usr/bin/ --filename=composer
RUN git config --global --add safe.directory /var/www/html
# Set the working directory
WORKDIR /var/www/html
# Copy the application code to the container
COPY . .
# Expose port 9000 for PHP-FPM
EXPOSE 9000
# Start PHP-FPM
CMD ["php-fpm"]