-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
27 lines (21 loc) · 743 Bytes
/
Dockerfile
File metadata and controls
27 lines (21 loc) · 743 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
# Use an official PHP 8 Apache base image
FROM php:8.0-apache
# Set the working directory to /var/www/html
WORKDIR /var/www/html
# Copy the current directory contents into the container at /var/www/html
COPY . /var/www/html
# Install any needed packages, including the GD extension
RUN apt-get update && apt-get install -y \
libfreetype6-dev \
libjpeg62-turbo-dev \
libpng-dev \
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
&& docker-php-ext-install -j$(nproc) gd \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Enable Apache mod_rewrite for URL rewriting
RUN a2enmod rewrite
# Expose port 80 for Apache
EXPOSE 80
# Start Apache when the container is launched
CMD ["apache2-foreground"]