-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (28 loc) · 741 Bytes
/
Dockerfile
File metadata and controls
36 lines (28 loc) · 741 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
FROM php:8.3-cli
WORKDIR /app
# Install system dependencies and PHP extensions
RUN apt-get update && \
apt-get install -y --no-install-recommends \
git \
unzip \
libzip-dev \
libxml2-dev \
libcurl4-openssl-dev \
&& docker-php-ext-install \
zip \
dom \
curl \
intl \
&& rm -rf /var/lib/apt/lists/*
# Install Composer
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
# Copy composer files and install dependencies
COPY composer.json composer.lock ./
RUN composer install --no-dev --optimize-autoloader --no-interaction
# Copy source code
COPY . .
# Create non-root user
RUN useradd --create-home --shell /bin/bash app
USER app
EXPOSE 8000
CMD ["php", "-S", "0.0.0.0:8000"]