-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
32 lines (24 loc) · 932 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
30
31
32
# Use an official PHP image as a starting point
FROM php:8.3-cli
# Download and install Composer
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && \
php composer-setup.php --install-dir=/usr/local/bin --filename=composer && \
php -r "unlink('composer-setup.php');"
# Install the zip extension
RUN apt-get update \
&& apt-get install -y libzip-dev zip \
&& docker-php-ext-install zip
# Install the zip extension for alpine linux distributions
#RUN apk update && \
# apk add --no-cache libzip-dev zip && \
# docker-php-ext-install zip
# Set the working directory to the root of your project
WORKDIR /app
# Copy the composer.json and composer.lock file to the container
COPY composer.json ./
# Install the dependencies
RUN composer install
# Copy the rest of your application to the container
COPY . .
# Default command to run when container starts
CMD ["php", "index.php"]