loreakasmatzen_docker/Dockerfile

44 lines
1.0 KiB
Docker

FROM debian:bullseye-slim
ARG PASSWORD
ENV PASSWORD $PASSWORD
RUN echo $PASSWORD
RUN apt update && apt -y upgrade
RUN apt -y install apt-transport-https lsb-release ca-certificates curl gnupg && \
curl https://packages.sury.org/php/apt.gpg | apt-key add - && \
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list && \
apt update
RUN apt install -y \
apache2 libapache2-mod-php5.6 \
php5.6-gd php5.6-curl php5.6-mcrypt php5.6-imagick php5.6-json php5.6-xsl php5.6-mysql php5.6-apcu php5.6-common
RUN a2enmod proxy*
RUN a2enmod rewrite
RUN rm -rf /var/www/html/*
COPY data/ /var/www/html/
RUN sed -i "s/1234567890/$PASSWORD/" /var/www/html/inc/conexion.php
RUN chown -R www-data:www-data /var/www/
#COPY config/default.conf /etc/apache2/sites-available/000-default.conf
#ENTRYPOINT ["/usr/sbin/apache2", "-k", "start"]
#ENV APACHE_RUN_USER www-data
#ENV APACHE_RUN_GROUP www-data
#ENV APACHE_LOG_DIR /var/log/apache2
EXPOSE 80
CMD apachectl -D FOREGROUND