|
|
|
FROM php:8.2-apache |
|
|
|
|
|
RUN apt-get update && apt-get install -y \ |
|
wget \ |
|
git \ |
|
gnupg \ |
|
lsb-release \ |
|
apt-transport-https \ |
|
ca-certificates \ |
|
libpq-dev \ |
|
libsqlite3-dev \ |
|
zip \ |
|
unzip \ |
|
&& docker-php-ext-install pgsql pdo_pgsql pdo_sqlite |
|
|
|
|
|
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer |
|
|
|
|
|
RUN composer global require laravel/installer |
|
|
|
|
|
ENV PATH="$PATH:/root/.composer/vendor/bin" |
|
|
|
|
|
RUN laravel new /var/www/html/laravel |
|
|
|
|
|
|
|
RUN wget https://github.com/phpmyadmin/phpmyadmin/archive/refs/tags/RELEASE_5_1_4.tar.gz -O phpmyadmin.tar.gz \ |
|
&& tar -xzvf phpmyadmin.tar.gz -C /var/www/html --strip-components=1 \ |
|
&& rm phpmyadmin.tar.gz |
|
|
|
|
|
|
|
RUN sed -i 's/Listen 80/Listen 7860/' /etc/apache2/ports.conf \ |
|
&& sed -i 's/:80/:7860/' /etc/apache2/sites-available/000-default.conf |
|
|
|
|
|
RUN chmod -R 777 /var/ \ |
|
&& chmod -R 777 /etc/apache2/ |
|
|
|
|
|
|
|
RUN [ -f /var/www/html/phpmyadmin/config.inc.php ] && chmod 644 /var/www/html/phpmyadmin/config.inc.php || true |
|
|
|
|
|
COPY ./php/ /var/www/html/ |
|
|
|
|
|
RUN chown -R www-data:www-data /var/www/html/ \ |
|
&& chmod -R 777 /var/www/html/ |
|
|
|
|
|
ENV PMA_HOST=mysql-7364790-localbugtv.l.aivencloud.com |
|
ENV PMA_PORT=10490 |
|
ENV MYSQL_ROOT_PASSWORD=root |
|
ENV APACHE_PORT=7860 |
|
|
|
|
|
EXPOSE 7860 |
|
|
|
|
|
CMD ["apache2-foreground"] |