-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
54 lines (44 loc) · 1.27 KB
/
Dockerfile
File metadata and controls
54 lines (44 loc) · 1.27 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
FROM php:8.5-fpm
# Install additional system dependencies
RUN apt-get update && apt-get install -y \
git \
unzip \
libzip-dev \
libpng-dev \
libjpeg62-turbo-dev \
libfreetype6-dev \
libcurl4-openssl-dev \
libxml2-dev \
libicu-dev \
libonig-dev \
ffmpeg \
&& rm -rf /var/lib/apt/lists/*
# Configure GD with jpeg and freetype support
RUN docker-php-ext-configure gd --with-freetype --with-jpeg
# Install only extensions that aren't in the base image
RUN docker-php-ext-install -j$(nproc) \
pdo_mysql \
mysqli \
zip \
intl \
exif \
pcntl
# Install Composer
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
# Set working directory
WORKDIR /var/www/html
# Copy application files
COPY . /var/www/html/
# Install CodeIgniter 4 framework
RUN composer install --no-dev --prefer-dist --ignore-platform-reqs --no-interaction --no-progress || true
# Create writable directories
RUN mkdir -p /var/www/html/writable/cache \
/var/www/html/writable/logs \
/var/www/html/writable/session \
/var/www/html/writable/uploads \
/var/www/html/writable/debugbar \
&& chmod -R 777 /var/www/html/writable
# Expose port 9000
EXPOSE 9000
# Start PHP-FPM
CMD ["php-fpm"]