-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (24 loc) · 700 Bytes
/
Dockerfile
File metadata and controls
31 lines (24 loc) · 700 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
FROM php:8.5-cli
# Install system dependencies and PHP extensions
RUN apt-get update && apt-get install -y \
libzip-dev \
zip \
unzip \
&& rm -rf /var/lib/apt/lists/* \
&& docker-php-ext-install -j$(nproc) \
zip \
pdo \
pdo_mysql \
sockets
# Install Composer
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
ENV COMPOSER_ALLOW_SUPERUSER=1
WORKDIR /youtube-search-api
# Copy only composer files first
COPY composer.json composer.lock ./
# Install dependencies
RUN composer install --no-scripts --no-autoloader
# Copy the rest of the application
COPY . .
# Generate optimized autoload files
RUN composer dump-autoload --optimize