-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
37 lines (27 loc) · 738 Bytes
/
Dockerfile
File metadata and controls
37 lines (27 loc) · 738 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
33
34
35
36
37
FROM php:8.4-alpine
# Install system dependencies
RUN apk add --no-cache \
git \
sqlite-dev \
unzip \
zip
# Install PHP extensions
RUN docker-php-ext-install pcntl pdo_sqlite
# Install Composer
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
# Set working directory
WORKDIR /var/www
# Copy application files
COPY . .
# Install dependencies
RUN composer install --no-dev --optimize-autoloader --no-interaction && \
rm composer.json composer.lock
# Set permissions
RUN chown -R www-data:www-data /var/www
RUN chmod -R 755 /var/www
# Expose port
EXPOSE 8080
# Set Framework X server to listen on all interfaces
ENV X_LISTEN=0.0.0.0:8080
# Start Framework X server
CMD ["php", "public/index.php"]