Nofu/Dockerfile

36 lines
1.1 KiB
Text
Raw Permalink Normal View History

2024-06-14 17:20:01 +02:00
FROM debian:stable-slim
MAINTAINER Knah Tsaeb <knah-tsaeb_soshot@knah-tsaeb.org>
LABEL version="0.3.0"
2024-06-14 17:20:01 +02:00
LABEL description="Apache 2 / PHP / Nofu"
ENV DEBIAN_FRONTEND=noninteractive
2024-07-02 15:44:39 +02:00
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
2024-06-14 17:20:01 +02:00
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/
2024-07-02 15:44:39 +02:00
RUN cp .docker/start.sh /usr/bin/start.sh
2024-06-14 17:20:01 +02:00
RUN chmod +x /usr/bin/start.sh
2024-07-02 15:44:39 +02:00
RUN cp .docker/apache2/nofu.conf /etc/apache2/sites-available/nofu.conf
2024-06-14 17:20:01 +02:00
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 .
2024-06-14 17:20:01 +02:00
# 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