-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
38 lines (28 loc) · 792 Bytes
/
Dockerfile
File metadata and controls
38 lines (28 loc) · 792 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
38
FROM php:8.3-cli-alpine
# Install system dependencies
RUN apk add --no-cache \
curl \
zip \
unzip \
git \
oniguruma-dev \
libzip-dev \
&& docker-php-ext-install \
zip \
mbstring
# Install Composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
# Set working directory
WORKDIR /app
# Copy composer files first for better caching
COPY composer.json composer.lock ./
# Install dependencies
RUN composer install --no-dev --optimize-autoloader --no-scripts
# Copy application code
COPY . .
# Create cache directory
RUN mkdir -p var/cache && chmod -R 775 var/
# Install Transformers models
RUN php bin/console transformers:download
EXPOSE 8000
CMD ["php", "-S", "0.0.0.0:8000", "-t", "public/"]