forked from mantas-done/subtitles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
29 lines (20 loc) · 775 Bytes
/
Dockerfile
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
# Use an official PHP CLI image
FROM php:8.2-cli
# Set the base working directory for the application
WORKDIR /app
# Copy all files into the container's working directory
COPY . /app
# Install Composer globally
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
# Install dependencies without dev requirements
RUN composer install --no-dev
# Change the working directory to the build folder
WORKDIR /app/build
# Disable phar.readonly by appending to the PHP configuration
RUN echo "phar.readonly = Off" >> /usr/local/etc/php/php.ini
# Run the build script
RUN php docker_build.php
# Return to the main application directory
WORKDIR /app
# Default command (can be overridden)
ENTRYPOINT ["php", "subtitles.phar"]