-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
49 lines (40 loc) · 1.09 KB
/
Copy pathDockerfile
File metadata and controls
49 lines (40 loc) · 1.09 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
FROM php:8.5-cli
# Install required system packages and PHP extensions
RUN apt-get update && apt-get install -y \
libicu-dev \
libsqlite3-dev \
unzip \
git \
&& docker-php-ext-configure pdo_sqlite --with-pdo-sqlite=/usr \
&& docker-php-ext-install \
intl \
pdo \
pdo_sqlite \
&& rm -rf /var/lib/apt/lists/*
# Install Composer
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
WORKDIR /app
# Copy Composer files first for better Docker caching
COPY composer.json composer.lock ./
# Install production dependencies
RUN composer install \
--no-dev \
--prefer-dist \
--no-interaction \
--no-progress \
--optimize-autoloader
# Copy application
COPY . .
# Make CodeIgniter writable directory available
RUN mkdir -p \
writable/cache \
writable/logs \
writable/session \
writable/uploads \
&& chmod -R 775 writable
RUN chmod +x docker/entrypoint.sh
# Render provides PORT
EXPOSE 10000
# CodeIgniter 4 public directory
#CMD ["sh", "-c", "php -S 0.0.0.0:${PORT:-10000} -t public"]
ENTRYPOINT ["./docker/entrypoint.sh"]