-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (22 loc) · 799 Bytes
/
Dockerfile
File metadata and controls
30 lines (22 loc) · 799 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
# Use PHP 8.4-FPM official image
FROM php:8.4-fpm
# Set working directory
WORKDIR /var/www/html
# Install necessary system dependencies
RUN apt-get update
RUN apt-get install -y --no-install-recommends zip unzip git curl libsqlite3-dev
RUN docker-php-ext-install pdo pdo_mysql pdo_sqlite
RUN docker-php-ext-install pcntl
RUN docker-php-ext-configure pcntl --enable-pcntl
RUN apt-get install percona-toolkit --yes
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
# Install Composer
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
# Copy application files
COPY . .
# Set permissions
RUN chown -R www-data:www-data /var/www/html
RUN mkdir -p /var/www/html/database
RUN touch /var/www/html/database/database.sqlite
RUN chmod 777 /var/www/html/database/database.sqlite
CMD ["php-fpm"]