Created
August 25, 2024 02:24
-
-
Save Cristy94/33cea401d1b6970ed2f0900d57088986 to your computer and use it in GitHub Desktop.
Dockerfile for LAMP container - MariaDB PHP 8 Ubuntu 22.04
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:22.04 | |
ARG DEBIAN_FRONTEND=noninteractive | |
RUN apt-get update | |
RUN apt-get install -y apt-transport-https | |
RUN apt-get install -y software-properties-common | |
RUN add-apt-repository -y ppa:ondrej/php | |
RUN add-apt-repository -y ppa:ondrej/apache2 | |
RUN apt-get update | |
RUN apt-get install --no-install-recommends -y mariadb-server apache2 libapache2-mod-php8.3 php8.3-apcu php8.3-curl php8.3-mysql php8.3-zip unzip | |
RUN apt-get install curl | |
RUN chown -R www-data: /var/www | |
RUN a2enmod headers rewrite | |
RUN a2enmod proxy_fcgi setenvif | |
RUN echo "ServerName localhost" | tee /etc/apache2/conf-available/fqdn.conf && a2enconf fqdn.conf | |
RUN echo '<Directory /var/www/>' > /etc/apache2/conf-available/allowoverride.conf && \ | |
echo ' AllowOverride All' >> /etc/apache2/conf-available/allowoverride.conf && \ | |
echo '</Directory>' >> /etc/apache2/conf-available/allowoverride.conf && \ | |
a2enconf allowoverride | |
# Start Apache service | |
CMD ["apachectl", "-D", "FOREGROUND"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment