FROM debian:stable-slim MAINTAINER Knah Tsaeb LABEL version="0.3.0" LABEL description="Apache 2 / PHP / Nofu" ENV DEBIAN_FRONTEND=noninteractive RUN apt-get -y update && apt-get install -y git composer php apache2 php-cli php-curl php-gd && apt-get clean && apt-get autoremove -y RUN rm -r /var/www/ && mkdir /var/www/ WORKDIR /var/www/ RUN git clone https://forge.leslibres.org/Knah-Tsaeb/Nofu.git --branch main --single-branch --depth 1 . RUN composer install --no-dev && chown -R www-data:www-data /var/www/ RUN cp .docker/start.sh /usr/bin/start.sh RUN chmod +x /usr/bin/start.sh RUN cp .docker/apache2/nofu.conf /etc/apache2/sites-available/nofu.conf RUN a2dissite 000-default.conf && a2ensite nofu.conf && a2enmod rewrite EXPOSE 80 WORKDIR /var/www/ ENTRYPOINT "start.sh" # Build image # docker buildx build -t nofu:0.3.0 . # Run container # docker run -d --restart unless-stopped -v nofu_data:/var/www/data -e TZ=UTC -p 8189:80 --name nofu nofu:0.3.0 # docker run -d --restart unless-stopped -v /opt/nofu:/var/www/data -e TZ=UTC -p 8189:80 --name nofu nofu:0.3.0