Photowall_Docker/Dockerfile

34 lines
852 B
Docker

FROM ubuntu:20.04
# install necessary packages
RUN \
apt-get update && \
DEBIAN_FRONTEND="noninteractive" apt-get install apache2 php libapache2-mod-php php-mysql php-xdebug imagemagick libimage-exiftool-perl -y
# rm -rf /var/lib/apt/lists/*
# define volumes
VOLUME ["/var/www/html/ARTWORKS", "/var/log/apache"]
# copy startscript
COPY entrypoint.sh /entrypoint.sh
# change workdir
WORKDIR /var/www/html
# copy PhotoWall webapplication files
COPY ./wwwdata/*.php /var/www/html/
COPY ./wwwdata/js /var/www/html/js/
COPY ./wwwdata/*.css /var/www/html/
COPY ./wwwdata/media /var/www/html/media/
COPY ./php.ini /etc/php/7.4/apache2/
COPY ./config/apache2 /etc/apache2
COPY ./database_init.php /database_init.php
# let through ports for webserver and xdebug access
EXPOSE 80
EXPOSE 9000
# define starting command
CMD ["sh", "/entrypoint.sh"]