You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
655 B

# Use the official PHP image with Apache
FROM php:8.1-apache
# Set the working directory inside the container
WORKDIR /var/www/html
# Copy your PHP application into the container
COPY ./src /var/www/html
# Install any required PHP extensions (e.g., mysqli, pdo)
RUN docker-php-ext-install mysqli
# Set permissions for Apache
RUN chown -R www-data:www-data /var/www/html \
&& chmod -R 755 /var/www/html
RUN apt-get update && apt-get install -y sendmail
RUN echo "sendmail_path = /usr/sbin/sendmail -t -i" >> /usr/local/etc/php/php.ini
# Expose port 80 to access the web server
EXPOSE 80
# Start the Apache server
CMD ["apache2-foreground"]

Powered by TurnKey Linux.